Test a 6-DOF Robotic Arm Sorting Station Case in ROS2

Source:

Author: Automatic Addison

OpenSource : automaticaddison/mycobot_ros2: Automatic Addison support for the myCobot robotic arm by Elephant Robotics - ROS 2

Preparation:

Development Environment :This tutorial was tested and verified in the Ubuntu 24.04 with ROS2 Jazzy or use Docker to pull the image(successfully tested in Ubuntu 20.04)

Run the Project:

1. Clone the Project:

mkdir ~/ros2_ws/
cd ~/ros2_ws/
git clone https://github.com/automaticaddison/mycobot_ros2

If you are not familiar with ROS2 or do not know the role of each folder, please refer to this article https://automaticaddison.com/naming-and-organizing-packages-in-large-ros-2-projects/, or re-learn the knowledge of ROS2, This knowledge is significant.

2.Pull the Image (use Docker)

Make sure to start your Docker service .

Then, press Ctrl+Alt+T to open a new terminal, input the command, and press Enter.

cd ~/ros2_ws/mycobot_ros2/docker/bash build.sh

3. Start the Container

docker-compose up --build

Ctrl + C

Stop your test and continue.

docker-compose up -d manipulation

4. Test myCobot 280 Series Model in Rviz

xhost +
docker-compose exec manipulation bash
ros2 launch mycobot_description robot_state_publisher.launch.py

You can adjust the status of the robot and the claw using the sliderbars.

5. Test Motion Planning Task

Make sure that you are still in the Docker container

Open your terminal.

echo "alias pointcloud='bash ~/ros2_ws/src/mycobot_ros2/mycobot_mtc_pick_place_demo/scripts/pointcloud.sh'" >> ~/.bashrc
echo "alias pick='bash ~/ros2_ws/src/mycobot_ros2/mycobot_mtc_pick_place_demo/scripts/robot.sh'" >> ~/.bashrc

Then, press Enther to acitivate this 2 demos.

pick

You can learn about the motion planning tasks in Rviz.

the Gazebo will look like

gif1-demo

Summary

Thanks to Addison’s excellent open source, this article is just a quick installation and testing of the project as a user. Addison provides detailed explanations and tutorials from ROS2 installation to project construction, and his article is perfect for beginners to systematically learn ROS2( https://automaticaddison.com/tutorials/ ).

If you want to test this simulation project with real robotic arm, the myCobot 280 series are perfect for you. We are looking forward to more users using our products for development!

1 Like