Skip to content

Planning Tab Tutorial

tobiaskunz edited this page Feb 10, 2013 · 4 revisions

The planningTab example shows how to make use of the planners in DART and how to use a controller to apply torques to a robot. It is designed to only work with the provided world file "planningTab_World.urdf".

Build and run the "planningTab" application. Load the "planningTab_World.urdf" file located in the "scenes" folder by choosing "File | Load" from the menu or clicking the "Load" button in the tool bar.

Click on "Planning Tab" on the bottom of the GRIP interface to see the custom interface created by this example app. It has 8 buttons.

Running the planner and simulation

Click "Show Start" to see the predefined start configuration for the planning problem. Do the same for "Show Goal". Click "Do Planning" to start the planning process. The planner plans a path for the right arm only. The window is going to be unresponsive while the planning is in process. Once the planning is done click the "Start Simulation" button in the tool bar on the top. Now the full dynamics of the robot are simulated while the controller is applying torques to the joints to follow the planned trajectory. On the right there are two boxes containing numbers. The left one shows the current simulation time. The right one shows the factor by how much simulation time is slowed down compared to real time. Press the "Stop Simulation" button in the tool bar once you have seen enough.

Pushing objects

Restart the "planningTab" application and reload the world as described above. (This is necessary because the example does not yet reset things correctly when planning multiple times.)

Click "Do Planning". Once the planning is done, click "Relocate objects". This moves the two cubes on the table into the path of the robot arm. Since the path was planned before the objects were moved, the robot arm is not going to avoid them. Click "Start Simulation". The arm moves and pushes the objects out of the way.

Changing the planning problem

Restart the "planningTab" application and reload the world as described above.

Now you can use the 5 buttons on the left of the planning tab to change up the planning problem. You can press "Relocate objects" before planning a path in order to have the planner avoid the objects. You can also change the start and goal configurations. To do that open the "Inspector" tab on the bottom. The inspector tab lets you alter links and joints of a robot. But you first have to select a robot link using the tree view list on the right. Click on one of the 6 links of the right arm ("Body_RSP", "Body_RSR", "Body_RSY", "Body_REP", "Body_RWY", "Body_RWP"). Now, you can change the joint angle of the parent joint of the link you selected by changing the slider on the left in the "Inspector" tab. Repeat this until you have set all joints to the desired values. You can set the current arm configuration as the start or goal configuration for the planner by clicking the "Set Start/Goal Conf" button on the "Planning" tab. You can also reset the start and goal configurations to the predefined ones by clicking the "Set Predef Start/Goal" buttons. After your changed the planning problem you can run the planner again by clicking "Do Planning" and then start the simulation.

Now, look at the source code of the planning tab in planningTab/planningTab.cpp/.h to see how its functionality is implemented.