- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
In this How-to I present a demo example in which MoveIt! ROS2 library, running on ctrlX CORE X7, plans a robot trajectory.
1. Concept
Let's first understand how MoveIt2! works.
The MoveIt2! package main functionalities are included in the "move_group" ROS2 node. This node receives inputs from the user and is able to plan low-level robotic actions thanks to its knowledge of the robot configuration (loaded in the ROS Param Server). Moreover, it communicates with the robot hardware, i.e. sensors and controllers, in order to get environment information or deploy actions respectively.
The user interface to the "move_group" can be done via C++, Python or directly from Rviz. However, this way of interacting with the planner is really low-level. For this reason, MoveIt has developed "MoveIt Task Constructor" (MTC). MTC is a higher-level layer of abstraction that allows the user to easily plan complex tasks, in which several several sub-tasks are involved.
With this ideas in mind, the system architecture would be described as presented in the following picture.
2. Demo description
This demo is based on the example available in the MTC documentation. It uses a Franka Emika Panda robot to execute a pick and place task. This robotic platform is widely used in the research world and loved for its well ROS2 compatibility.
In our case, we will run the robot emulation using functionalities from ros2_control and ros2_controllers, the move_group node and a "mtc_demo" node that used the MTC functionalities in ctrlX OS.
Such components running in ctrlX OS will communicate information thanks to the ROS2 DDS middleware to a Desktop Computer running Ubuntu22, in which an Rviz visualization will be hosted.
3. Deployment in ctrlX OS
For this demo you need to install two snaps: ros2-base-humble and ros2-moveit-mtc. Sadly we cannot share the the instructions to compile them in this How-To. Please feel free to reach us if you are interested by leaving a comment in this post.
- ros2-base-humble includes the basic runtime for ROS2 humble. Its resources are used by other ROS2 snaps.
- ros2-moveit-mtc includes three main components: the Robot HW controllers, the move_group node and a specific node that uses MTC to plan a complex task.
We would need a launcher to start the Rviz simulation on your Desktop Computer.
4. Run the example
This example assumes you have SSH connection rights with your X7.
4.1. Connect the devices
Connect your ctrlX CORE X7 and the Ubuntu Desktop Computer in the same local network.
4.2. Run the robot HW and the move_group
Open a SSH connection and run:
sudo ros2-moveit-mtc.initALL
4.3. Start the visualization
Open a terminal in your Desktop computer and run the bash that starts the simulation. It sources the ROS2 workspace that was created during the snap compilation, so it will only work if you have compiled the snap, which runs colcon build in the process, and hence the install directory is present.
cd <your_path>/moveit-mtc/
./visualization_demo.sh
You should see the robot in this specific pose.
If it's not exactly like this, it means the initALL routine failed in the ctrlX CORE. In this case, shut it down with ctrl^C and call the command again.
4.4. Start the MTC node
Open a SSH connection and run:
sudo ros2-moveit-mtc.task
If everything is correct, you should see the robot moving.
Related Links
Have fun with your robots!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.