Starting from:

$29.99

Project 2: Configuration Spaces

Algorithmic Robotics
COMP/ELEC/MECH 450/550
Project 2: Conguration Spaces
The goal of this project is to provide a deeper understanding of the relation between a robot and its conguration space (or “C-Space”). The mapping from the robot and environment (a collection of rigid bodies
in either 2D or 3D) to the abstract conguration space (possibly high-dimensional, non-Euclidean) can
be unintuitive—how do the obstacles in the workspace result in obstacles in the conguration space? We
are providing a script, se2ez-gui, available on the virtual machine that provides live visualization of the
conguration space for planar robots. You will be editing robot description les and viewing their resulting
conguration spaces, as well as proling the performance of a few motion planners in the scenes you create.
The se2ez-gui Program
First, extract the provided Project 2 les. Open a terminal into the Docker container, navigate to the now
extracted Project 2 folder, and type se2ez-gui class/planar.yml. You should see the following GUI
appear:
You will be using this GUI to explore various robot and environment congurations to get a better understanding of the conguration space. The GUI has components to visualize the conguration space of a robot,
1
visualize two states of the robot, and visualize motion planning results. There are four main components in
the GUI:
1. Control Panels: To the right are a variety of options to control visualization, as well as execute
subroutines such as planning. Notice at the top there are four tabs: “CSpace” for conguration
space visualization options, “Robot1” for options for one robot state and “Robot2” for the other, and
“Planning” for motion planning. We call the panel currently selected the “active” panel. The specics
of each panel will be discussed later.
2. Workspace Visualization: This is the main visualization component which displays all rigid bodies
in the workspace. In this program, there are two robot states visualized—“Robot1” and “Robot2”,
denoted by the oating text over the robot. If a motion plan is executed, the motion plan will also be
visualized here. “Mouse 1”, or left clicks, pans the workspace around. “Mouse 2”, or right clicks,
controls the active panel. Scrolling zooms in and out. If the “CSpace” panel is selected, the robot’s
state can be set via right-clicking in the conguration space visual. If the “Robot1” or “Robot2” panels
are selected, the robot’s state is set via inverse kinematics to wherever the mouse is in workspace.
3. Conguration Space Visualization: This is a visualization of the robot’s conguration space. The red
dot is the current state of the robot. The X- and Y-axes are two conguration dimensions of the robot,
set by the conguration space panel.
4. Display Controls: Controls for the current display, including current workspace X, Y, and zoom. The
screenshot button will take a screenshot of the current display and save it to the directory where
se2ez-gui was run.
Try right-clicking in the workspace visualization, specically within the purple box: you should see the robot,
the grey rectangle, moves where you click. Notice that this moves “Robot1,” and not the “Robot2” panel. If
you want to move “Robot2,” select the “Robot2” panel, then right click in the workspace. Moreover, note
how the conguration space changes with the rotation—the conguration space shown is just a 2D “slice” of
the 3D conguration space on the X- and Y-axes of the robot (this can be changed, discussed later).
You should also try out the other planar arm robots included with the project les: se2ez-gui class/2-link.yml
and se2ez-gui class/arm.yml
2
Conguration Space Panel
The rst panel visible is the conguration space panel, labeled as “CSpace.” This controls the display settings
for the conguration space visualization in the upper left. The important settings are as follows, from top to
bottom as indicated in the gure:
1. State Display: Chooses which robot state panel to show as the red dot in the conguration space.
2. Axes: Selects which two conguration space dimensions to show. Displays a “slice” of the conguration
space along these two dimensions. The rest of the robot’s conguration variables are kept the same in
this slice.
3. Obstacle Color: Colors the conguration space obstacles identical to their workspace counterparts if
true. Useful for understanding the mapping between workspace and conguration space. We highly
recommend using this feature.
4. High-Res: Generates a higher resolution image of the conguration space slice. Takes longer to update
due to needing more computation.
5. Fullscreen: Increases the size of the conguration space display without increasing the resolution.
6. Show Plan: If a motion plan is computed with the “Planning” panel, result will also be displayed
in conguration space as an orange path. Note that plans are shown “projected” onto the current
conguration space slice—if you have a robot with more than 2 degrees of freedom, it will appear as if
the path goes through an obstacle as some “hidden” variable is changing.
7. Show Graph: Shows the search graph generated by the planner. Both edges and states can be shown.
8. Save Image: Saves a high-resolution image of the current conguration space slice.
3
Robot State Panels
The second and third panels control two robot states (congurations) of the robot. These are “Robot1” and
“Robot2.” As stated before, right clicking in the workspace while one of these panels is active will use inverse
kinematics to set the location of the robot to the clicked point. If the robot does not move where you clicked,
it means it could not nd a valid solution that placed the robot where you clicked—try somewhere else. These
panels have the following important options, from top to bottom as indicated in the gure:
1. Joint Name: Each joint on the robot has a name, and this name is displayed before that joint’s value
controls.
2. Joint Values: The values for the controllable elements of the joint, displayed as a slider and an input
box.
3. Transparency: Sets the transparency of the robot state display.
4. Coordinate Frames: Displays the local reference frames in the robot and environment for the current
conguration.
5. Highlight Collisions: Highlights the colliding elements of the robot and environment red when a
collision occurs.
6. Set to Random State: Uniformly samples a random robot state.
4
Planning Panel
The nal panel has controls for computing and displaying motion plans. To start out, simply maneuver
“Robot1” to a different conguration than “Robot2” by right-clicking somewhere in the workspace. Do the
same by then selecting the “Robot2” panel and manuevering “Robot2” to somewhere else. Then, switch back
to the planning panel and click the large “Plan” button (pointed out by “Start Planning”). You should see the
swept volume of a plan that carries the robot from “Robot1” to “Robot2” now displayed in the workspace
and conguration space. This panel has the following important options, from top to bottom as indicated in
the gure:
1. Motion Planner: Select which motion planner to use here. This is similar to OMPL.app.
2. Start Planning: Press this button to start motion planning! You should see planner output in the
terminal you launched se2ez-gui from.
3. Allowed Planning Time: Congure the amount of time given to the planner here.
4. Show Motion Plan: Deselect this to stop displaying the found motion plan. Note the “Swept” and
“Animate” boxes at the bottom. If “Animate” is checked, uncheck “Swept” to display an animated
version of the motion plan.
5. Plan Transparency: Change the display transparency of the states shown in the path display.
6. Show Planning Graph in Workspace: Switch to this tab to show options for displaying the motion
planning graph in the workspace, with respect to some frame of the robot.
7. Planner Settings: Same as in OMPL.app, the various setting each planner has.
5
Robot Description Format
se2ez-gui loads robots specied by a simple YAML le. All les are specied as a list of coordinate frames, each of which has some set of rigid bodies attached. Before more specic documentation,
use the following example les for a rigid body that can translate and rotate in the plane (similar to
the provided class/planar.yml le) and a planar manipulator with two links (similar to the provided
class/2-link.yml le).
Listing 1: Example Rigid Body YAML File
1 robot : # All files must begin with the " robot " field .
2 # Below is a list of all coordinate frames on the robot .
3 - name : " l1 " # Every coordinate frame needs a unique name .
4 joint : " flying " # The joint type that controls the frame ( more later )
5 limits : # Some joint types need position limits specified
6 upper : [ 2 , 2] # For " flying " joints , need X - and Y - limits
7 lower : [ -2 , -2]
8 geometry : # Specify rigid body geometry attached to frame
9 - type : " box " # Type of geometry . Types are specified below
10 dimensions : [0.6 , 0.2] # X - and Y - dimensions of the box
11 # An example specification of an obstacle
12 # Note that by default the joint type is " fixed "
13 - name : " obstacle_1 "
14 tip : [1.25 , 1. , -2]
15 geometry :
16 - type : " box "
17 dimensions : [1.0 , 0.3]
18 color : [0.5 , 0.2 , 0.2 , 1]
Listing 2: Example Two-Link Planar Manipulator YAML File
1 # An example two - link manipulator robot
2 robot :
3 - name : " base " # Unique name
4 joint : " fixed " # By default , the joint type is " fixed " ( a fixed transform )
5 parent : " root " # There is an implicit frame " root " that is the world frame .
6 # If not specified , assumes " root "
7 tip : [0 , 0 , 0] # Transform applied _after_ applying the joint transform .
8 # The format is [X , Y , theta ] , where theta is in radians .
9 # Transform is applied in local reference frame .
10 geometry :
11 - type : " circle "
12 dimensions : [0.1]
13 - name : " link_1 "
14 joint : " continuous "
15 parent : " base " # Parent is the prior defined frame .
16 tip : [1 , 0 , 0]
17 allowed : [" base "] # Frames that this frame is allowed to collide with .
18 # Usually necessary for chain manipulators
19 # Multiple rigid bodies can be associated with a frame
20 geometry :
21 - type : " box "
22 dimensions : [0.5 , 0.1]
23 offset : [ -0.5 , 0 , 0] # Geometry can positioned at a fixed offset away
.
24 - type : " circle "
25 dimensions : [0.1]
26 - name : " link_2 "
6
27 joint : " continuous "
28 parent : " link_1 "
29 tip : [1 , 0 , 0]
30 allowed : [" link_1 "]
31 geometry :
32 - type : " box "
33 dimensions : [0.5 , 0.1]
34 offset : [ -0.5 , 0 , 0]
There are many joint types available to choose from:
Listing 3: Joint Types
1 # Fixed transform , cannot move .
2 # If not specified , joint is assumed fixed .
3 joint : " fixed "
4 ---
5 # SE (2) ( rotation and translation in the plane ) with rotation limits
6 joint : " float "
7 limits :
8 upper : [1 , 1 , 3.14]
9 lower : [ -1 , -1 , -3.14]
10 ---
11 # SE (2) ( rotation and translation in the plane ) without rotation limits
12 joint : " flying "
13 limits :
14 upper : [1 , 1]
15 lower : [ -1 , -1]
16 ---
17 # R ^2 ( translation in the plane )
18 joint : " translate "
19 limits :
20 upper : [1 , 1]
21 lower : [ -1 , -1]
22 ---
23 # Prismatic joints . Extend in the X - axis .
24 joint : " prismatic "
25 limits :
26 upper : 1
27 lower : -1
28 ---
29 # Revolute joints without rotation limits
30 joint : " continuous "
31 ---
32 # Revolute joints with rotation limits
33 joint : " revolute "
34 limits :
35 upper : 3.14
36 lower : -3.14
There are also a variety of rigid body geometries you can use, with placement and display options:
Listing 4: Geometry Types
1 geometry :
2 - type : " circle " # Circle
3 dimensions : [1] # Radius
4 - type : " box " # Rectangular Prism
7
5 dimensions : [1 , 1] # X - and Y - radii
6 - type : " convex " # Convex polygons
7 points :
8 - [3.91 , 3.74] # Vertices
9 - [1.61 , 1.07]
10 - [2.08 , 1.48]
11 - type : " simple " # Simple ( no holes ) polygons
12 points :
13 - [3.91 , 3.74] # Vertices
14 - [1.61 , 1.07]
15 - [2.08 , 1.48]
16 - [2.95 , 1.60]
17 - [4.41 , 3.03]
18 ---
19 geometry :
20 - type : " circle "
21 dimensions : [1]
22 offset : [0 , 0 , 0] # Offset transfrom from frame ’ s tip ( optional )
23 color : [0 , 0 , 0 , 1] # Geometry color in (r , g , b , alpha )
Finally, for the nal exercise of this project you will need to create “named” congurations of the robot,
which is another top-level YAML entry, placed underneath “robot”:
Listing 5: Named Congurations
1 robot :
2 ...
3 ---
4 states : # A list of name states
5 - name : " start " # Name of the state
6 configuration : # List of all configuration variables
7 - frame : " l1 " # Name of the frame ( joint ) specified
8 value : [ -1.68 , -1.16 , 1.571] # Joint value (X , Y , theta )
9
10 - name : " goal " # " start " and " goal " are used for benchmarking
11 configuration :
12 - frame : " l1 "
13 value : [0 , 1.44 , 0]
14 ---
15 states : # An example for a two - link revolute manipulator
16 - name : " start "
17 configuration :
18 - frame : " link_1 "
19 value : [1.257]
20 - frame : " link_2 "
21 value : [ -0.251]
22
23 - name : " goal "
24 configuration :
25 - frame : " link_1 "
26 value : [1.885]
27 - frame : " link_2 "
28 value : [ -1.571]
8
Figure 1: An example of hard planning environments, specically “bug traps,” named for the difculty that the bug
algorithms would have. Notable features include an expansive starting area that requires navigating a very narrow
passage to escape. b) shows the classic single bug-trap.
Provided Programs
Compile and execute the C++ programs in the src folder. To do this, simply extract the provided Project
2 les, open a terminal into the Docker container, navigate to the Project 2 folder, and type make. You
should now have two programs: se2ez-plan and se2ez-benchmark.
• se2ez-plan: This program executes a motion planning problem specied in a provided YAML le.
The program looks for the named congurations “start” and “goal” in the YAML le (see above). You
can run this program by executing ./se2ez-plan <filename.yml>. You should use this script to
validate that your YAML le’s planning problem is correct before benchmarking.
• se2ez-benchmark: This program benchmarks a motion planning problem specied in a provided
YAML le. The program looks for the named congurations “start” and “goal” in the YAML le (see
above). You can run this program by executing ./se2ez-benchmark -f <filename.yml>. You
can specify the number of runs by using the -r <runs>, and the amount of time for planning by using
-t <time in seconds>.
9
Deliverables
This project must be completed in pairs. You and your partner need only provide one submission. Submissions
are due Thursday Sept. 29 at 1pm.
To submit your project, create a compressed archive of all your YAML les with the following naming
scheme: Project2 <your NetID> <partner’s NetID>.zip. Submit this archive to Canvas. We provide
the script submit.sh that will automatically create the archive for you, and check if all expected les are
present. You can run the script by typing ./submit.sh <your netID> <your partner’s netID>.
In addition to the archive, you are required to submit a report. Make sure to include both you and your
partner’s name on the report. For all exercises, you must include a gure that shows the robot’s workspace.
This report should be a separate le from the archive. The report should be no longer than 6 pages in PDF
format, including gures. Try to optimize space in your document and also make an effort to be concise and
accurate in your writing. Your report should contain the following information:
1. (5 points) Design an environment for a robot that contains an “unintuitive” transformation from
workspace to conguration space. This is based on your denition of “unintuitive”—what is surprising
about the conguration space mapping, and why? Include an image of the robot’s conguration space.
Name your YAML le unintuitive.yml.
2. (5 points) Design an environment for a two-link manipulator with 1 revolute joint and 1 prismatic joint
(either order works). The environment must has two disconnected components in its conguration
space. Use at most two circular obstacles. Include an image of the robot’s conguration space and
identify the two components. Name your YAML le disconnected1.yml.
3. (5 points) Design an environment for a two-link revolute manipulator that has two disconnected
components in its conguration space. You can use no workspace obstacles, all geometry must be on
the robot. Recall that each frame on the robot can have multiple rigid bodies attached. Include an
image of the robot’s conguration space and identify the two components. Name your YAML le
disconnected2.yml.
4. Design a series of “bug-trap” environments (see Figure 1). Include a gure of both robot’s conguration
spaces and identify the bug-trap.
(a) (10 points) A bug-trap for a robot that can translate and rotate in the plane. Name your YAML
le bugtrap1.yml.
(b) (15 points) A bug-trap for a two-link manipulator robot with 1 revolute joint and 1 prismatic
joint (either order works). Name your YAML le bugtrap2.yml.
5. Design a series of environments that have at least two path homotopy classes. One of these two classes
must be a “short” path, but is signicantly harder for a planner to nd. The other class must be a
“longer way around,” but is signicantly easier for the planner to nd. For both, include a gure of this
robot’s conguration space and identify the two homotopy classes.
Include benchmarking results to support your claims. We recommend using the “simplied solution
length” value—use the advanced options to display the plot as a cumulative distribution function. You
should see an earlier bump in the curve corresponding to the few number of solutions that return this
more difcult homotopy class. This value corresponds to the path length after simplication routines
have been applied, and thus the output path from the planner will be closer to a local minimum for the
homotopy group.
(a) (10 points) An example for a robot that can translate and rotate in the plane. Name your YAML
le homotopy1.yml.
10
(b) (15 points) An example for a two-link revolute manipulator. Name your YAML le homotopy2.yml.
6. (15 points) Design an environment that contains a signicantly hard (but still solvable) planning
problem for a 2-D mobile manipulator robot. The robot has a two-link revolute arm mounted on its
base which can rotate and translate in the plane. Name your YAML le difficult.yml. Include
benchmarking results to support your claim of difculty. Identify what portions of this robot’s
conguration space make this problem difcult—include a gure of the conguration space with the
difcult areas identied.
7. (15 points) Design an environment that contains a signicantly hard (but still solvable) planning
problem for a robot with many (greater than two) degrees-of-freedom. You can only use revolute
and prismatic joints to build this robot. Name your YAML le highdof.yml. Include benchmarking
results to support your claim of difculty. Identify a portion of this robot’s conguration space make
this problem difcult—include a gure of a slice of the conguration space with the difcult areas
identied.
8. (5 points) Rate the difculty of each exercise on a scale of 1–10 (1 being trivial, 10 being impossible).
Give an estimate of how many hours you spent on each exercise, and detail what was the hardest part
of the assignment. Also, rate the difculty of using the se2ez-gui application and description format.
If you have any thoughts on what could be made easier or features that would be useful, please include
them here. Additionally, as you completed the project in pairs, describe your individual contribution
to the project.
Take time to complete your write-up. It is important to proofread and iterate over your thoughts. Reports will
be evaluated for not only the raw content, but also the quality and clarity of the presentation.
11

More products