How to Use MoveIt
Here are some steps to use MoveIt for your robot:
Step 1: Make sure you meet the prerequisites, including:
- Having URDF of your robot
- Having ros_control and friends installed
- Having all required MoveIt packages installed
Step 2: Run MoveIt Setup Assistant. This is a convenient GUI-based tool to setup the configuration of your MoveIt package. The step-by-step tutorial to run and complete MoveIt Setup Assistant can be found here: http://docs.ros.org/en/melodic/api/moveit_tutorials/html/doc/setup_assistant/setup_assistant_tutorial.html.
If you want to implement 3D perception using MoveIt, fill the configuration setup for that.
Upon completing the MoveIt Setup Assistant, you will have made a package for your MoveIt configuration. The package folder, let’s say it’s called “myrobot_moveit_config”, typically contains the following:
1 2 3 4 5 6 |
myrobot_moveit_config |--config |--launch |--package.xml |--CMakeLists.txt |--.setup_assistant |
Step 3: Check (and modify if necessary) the package created by the MoveIt Setup Assistant.
Step 4: Try to control your robot using MoveIt by using Rviz. Use the “Motion Planning” pallet.
Step 5: Try to integrate with Gazebo simulator. Plan and execute in Rviz; you should expect that the robot in Gazebo moves similarly.
Step 6: Try to integrate with real robot. Plan and execute in Rviz; you should expect that the real robot moves similarly.
Step 7: Create a package to write your custom motion planning node(s) in C++ or Python.
The tutorial to write your custom motion planning node(s) in C++ can be found here: http://docs.ros.org/en/melodic/api/moveit_tutorials/html/doc/move_group_interface/move_group_interface_tutorial.html
The tutorial to write your custom motion planning node(s) in Python can be found here: http://docs.ros.org/en/melodic/api/moveit_tutorials/html/doc/move_group_python_interface/move_group_python_interface_tutorial.html
In both C++ and Python, you can write node(s) to perform some tasks including:
- Planning a joint-space goal
- Planning a pose goal (in the task/Cartesian space)
- Planning with path constraints
- Planning Cartesian path(s)
- Adding/removing object(s) in the planning scene (i.e. the environment)
- Attaching/detaching object(s) to/from the robot’s body