Using cob_arm_navigation to plan collision-free arm movements for Care-O-bot 3.
Description: This tutorial will explain which launch files need to be started to plan collision-free movements for the care-o-bot mobile manipulator.Tutorial Level: BEGINNER
Contents
Prerequisites
This tutorial assumes that you are familar with:
starting a simulated care-o-bot in gazebo (see cob_bringup)
using the cob_dashboard to move the arm
Please compile cob_arm_navigation to make sure all dependencies can be found.
rosdep install cob_arm_navigation rosmake cob_arm_navigation
Start the planning environment
Please run each command in a separate Terminal window or tab!
To set up the planning environment call
roslaunch cob_bringup sim.launch
This will start the gazebo simulator and spawn the care-o-bot in a kitchen environment.
Next you need to launch the cob_2dnav platform navigation since the current configuration requires a fixed world coordinate frame "/map".
roslaunch cob_2dnav 2dnav.launch
Finally, the planning environment can be started with one of the following three settings:
Planning with self-collision checking
This version only considers collisions of the robot with itself during the planning process:
roslaunch cob_arm_navigation arm_navigation_self_collision.launch
Planning considering known obstacles
This version checks for self-collision as well as collisions against known obstacles. Therefore, it initially generates known obstacles for the objects in the environment and adds them to the collision_space. This is done in "src/addWorld.cpp" (see CodeAPI).
roslaunch cob_arm_navigation arm_navigation_static_collision.launch
Further obstacles are can be added similar to the tutorial Adding known objects to the collision environment. The file "src/addCylinder.cpp" already contains the necessary adaptations for care-o-bot and can be used as a template.
Planning using a ToF sensor data
A third version is able to not only consider self-collision and collision against known obstacle, but also uses camera data from a Time-of-Flight sensor to enable collision checking against dynamic or unknown obstacles.
roslaunch cob_arm_navigation arm_navigation_dynamic_collision.launch
It subscribes to the data of the ToF sensor ("/full_cloud") and sends this point cloud through a first filter that removes data points that correspond to known obstacles. Also, it filters data points that derive from parts of the robot itself using the robot_self_filter. The filtered data is then added to the collision_space.
Start a planner
Planning using OMPL
In order to plan collision-free movements a planner is needed. In cob_arm_navigation, launch files that are configured to use the Open Motion-Planning Library are included.
roslaunch cob_arm_navigation ompl_planning.launch
Planning using other planners
It is also possible to use a different planner on the Care-O-bot. Your planner only needs to advertise a service "/plan_kinematic_path" that satisfies the "GetMotionPlan.srv" service specification from motion_planning_msgs.
Perform collision-free movements
Once all nodes are running, you have the following to possibilities to perform planned motion.
Planned motion using the dashboard
This is the easiest way to plan collision-free paths to predefined configurations. It uses the cob_dashboard which is started by
roslaunch cob_dashboard dashboard.launch
On the cob_dashboard you can move all modules of the care-o-bot. However, planned motion can only be performed for the arm. To do so, enable the "Planning" check-box on the left side of the dashboard. As long as "Planning" is active all movements are planned.
Please note that the robot's initial configuration needs to be collision-free. If you are in a collision, simply deactivate "Planning" and move the arm without planned motion until it is collision-free again.
Planned motion within scripts
Planned motion for the care-o-bot has also been included into the cob_script_server. If you want to use planned motion in a more complex scenario, use the tutorials in cob_script_server/Tutorials and use "sss.move_planned()" instead of "sss.move()". Again, planned motion is only available for arm movements.






