Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 3.29 KB

File metadata and controls

66 lines (49 loc) · 3.29 KB

How to Define Worlds

Introduction

A world of platforms, obstacles, surfaces, and stepping surfaces. Platforms and Obstacles make up the entirety of the physical environment in which robot operates. Surfaces are planes onto which we project our obstacles to create our 2D projected workspaces. Stepping surfaces are planes that we voxelize to determine which cells the robot can step on. The code takes in this information via a list of .STL files. We recommend using Blender to model your environment, as the code also comes with a script that simplifies building the directory and exporting meshes.

The following documentation will walk through the various aspects of the "house" environment, in worlds/house/house_blend.zip.

Obstacles

Anything we don't want the robot to collide with is an obstacle. Examples include walls and furniture.

Platforms

The platform is the rest of the environment that is not described by the obstacles. If the robot can step on this part of the environment, then it is included in the platforms.stl file. Examples of platforms include stairs, floors, ramps, etc.

Surfaces

The world is segmented into multiple non-overlapping surfaces, each of which has its .STL file. We project the respective obstacles onto each of surfaces to create a series of 2D workspaces. For a given surface, there is a one-to-one mapping between (x, y) pairs and z-values. More complex platforms, such as the winding stairs, need to be represented with multiple surfaces.

Stepping Surfaces

Each surface has a corresponding stepping surface. If a surface maps to a part of the platform that is flat, then the surface and stepping surface are identical. However, in the case of stairs or other parts of the platform that are not flat, the stepping surfaces identify where the robot can place its feet.

Directory Structure and Exporting

A world directory should be laid out as follows:

world_name/
    |_platforms.stl
    |_obstacles.stl
    |_surfaces/
        |_surface_0.stl
        |_...
        |_surface_n.stl
    |_stepping_surfaces/
        |_stepping_surface.stl
        |_...
        |_stepping_surface_n.stl

If the world is being modeled in blender, then simply store the platforms in a group called platforms, the obstacles in a group called obstacles, the ith surface goes in a group called surface_i and the ith stepping surface goes in a group called stepping_surface_i.

worlds/house/house_blend.zip contains house_world.blend. You can view this blender file to see an example for how we grouped the various parts of the environment.

To export the meshes into the directory structure described above, run the following command from the worlds/ directory:

blender <world_name>/<blender_file> --background --python export_meshes.py