Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Basic Interface Guide
Description: Gives an overview of the RCommander interface.Tutorial Level: BEGINNER
Next Tutorial: Using the States Library
Contents
A Tour of the RCommander Interface
Above is the basic RCommander interface. RCommander is a tool for creating robot behaviors. Each robot behavior is represented as a network of linked actions where each action (or node) is a circle and arrows indicate the ordering in which those actions occur. The main job of the interface is to allow you to specify parameters that determine what each action will do and in which order.
There are three main regions to the interface itself:
Tools Panel: Top tabbed area with each tab containing a grid of buttons where each button activates its corresponding tool.
Properties & Connections: This area is shown on the right hand side. When either a tool button or action is selected this area fills up with the current parameters in effect. The properties tab contain parameters of the currently selected object. The connections tab contain information about how the current node is connected to other nodes.
Current Behavior: This is the white area containing little circles where each circle represents a node created through one of the tools in the Tools Panel.
Controlling the Robot
Each button in the tool panel activates a robot action. Try this out by clicking on the Gripper tool (in the Manipulation tab). After activating the Gripper tool, the properties panel populate with controls for opening and closing the gripper. For instance, the properties panel show options for selecting either the left or right gripper under Side, how wide to open/close the gripper under Gripper Opening, and how hard the gripper should close under effort (this number does not have physical meaning, the default 50 should be fine for gripping most things).
Now click Run. The robot should either open or close its gripper in response. The status bar at the bottom of RCommander should read "succeeded0".
Creating Your First Node
Controlling the gripper was great but let's combine it with other actions. Activate the Gripper tool again. Now, Select the settings desired using its controls. Next, click add. Clicking add creates a new cluster of nodes with the gripper action at the center highlighted in blue. Feel free to click on the other nodes. Notice that clicking on a node causes it to be highlighted in blue. Another change that happens when clicking is that the properties and connections tab fill up with the appropriate information for that particular node. Unlike gripper0, the other three nodes on screen preempted0, succeeded0, and aborted0 represents outcomes that can occur after running gripper0 and that, accordingly, there are no properties to edit nor connections to make with them.
Connecting a 2nd Action
With the first action added, now click on Tuck to activate the tuck tool and change the dialog box options to False for both left and right arm. Now click add. This creates another cluster of nodes on screen separate from the first cluster. To connect the first cluster, select gripper0, Connections, then under succeeded select tuck0. The graph will now show that after executing gripper0 successfully, the robot will now execute tuck0 as indicated by the arrows. Your robot behavior should now look like the image below:
If you are operating in a simulator, also connect aborted0 to tuck0 to avoid any troubles (this is due to a small bug with the gripper action in simulation). Now run the behavior by clicking on gripper0 and selecting Start State. This sets gripper0 as the starting point of our behavior (the display reflects this by adding an extra circle around gripper0), meaning that when we run this network gripper0 will be the first to run. Next, click on Actions then Run. The robot will now execute all the actions starting with gripper0 and other actions according to the direction of the arrows. The display will indicate which action is executing by highlighting the currently active action in green.
Running a Node
In normal circumstances, you might not want to execute both actions, or the entire behavior as shown but just an individual action. To do so, click on the action to run and click on the large Run button under the properties and connections panel (LEFT). Notice that this Run has a very different functionality from the Run under the Actions menu (RIGHT). The large run button only runs the node selected. The run menu option, on the other hand, runs the entire sequence of nodes starting with nodes that has a double circle.
Stopping Execution
While running with either of the methods above, you might want to cancel execution. To do so, select Actions then Stop. This should cause whatever is running to transition to the preempted output (LEFT).
Modifying the parameters of a Node
If you now want to modify one of the properties of either tuck0 or gripper0, select it, make your changes in the properties or connections box then click Save at the bottom of the screen. To preview your changes prior to saving, you can also click Run.
Reset
The big Reset button at the bottom when clicked will reset the properties panel back to its default setting. However, reset does not save those changes. To make reset's changes permanent, click Save.
Deleting Unwanted Nodes
To delete nodes that are no longer wanted, select that node, then click Delete underneath the tool bar. Deleting an action node such as tuck0 or gripper0 will also delete all its outcomes. However, deleting an outcome will merely cause another outcome node to take its place as outcome nodes are place holders.
Saving and Loading Your Work
RCommander works like most normal applications. To save or load your work, click on File then Save or Open as needed.