This repository is part of a research project in collaborative robotics, aiming to develop an experimental robotic manipulation scenario using the Dobot Magician robotic arm integrated with ROS 2 (Humble) and Python.
In this experiment, the Dobot Magician will be trained to recognize objects moving on a conveyor belt, determine their positions within its workspace, and autonomously perform pick-and-place operations, depositing them in predefined locations.
The system combines physical robotics, computer vision, simulation in RViz/Dobot Studio, and intelligent control algorithms, serving as a foundation for research in automation and robot learning.
- Create an experimental robotic scenario with the Dobot Magician.
- Implement object recognition for items moving on a conveyor belt.
- Estimate object positions within the robot’s workspace using sensors/computer vision.
- Program the Dobot to perform pick-and-place according to sorting criteria.
- Use ROS 2 + Python as the integration and control framework.
- Validate experiments in simulation (RViz, Dobot Studio) before running on real hardware.
- Operating System: Manjaro Linux
- ROS 2: Humble Hawksbill
- Language: Python 3.10+
- Environment Manager: Mamba
Simulation/Testing Tools:
- RViz: 3D visualization of the robot and workspace
- Dobot Studio: Workspace analysis and trajectory validation
- (Future) Kinect or other RGB-D camera for object recognition
Follow the steps below to set up and run the project.
Make sure you have Python 3.10+ installed.
Check your version:
python3 --versionFollow the official instructions for your OS:
👉 ROS 2 Humble installation guide
If you don't have ROS 2, install it first:
Follow the official instructions for your OS:
After installation, don't forget to source the setup file in every new terminal:
source /opt/ros/humble/setup.zsh🦾 You need two repositories — one for the ROS 2 integration and another for this research project’s scripts.
git clone https://github.com/jkaniuka/magician_ros2
cd magician_ros2Then clone this project repository, which contains the scripts and configurations for the pick-and-place scenario:
git clone git@github.com:Dutraat/dobot_ros2_pickplace.gitInside your environment, install the Python dependencies:
pip install -r requirements.txtFrom the root of the repository:
colcon build
source install/setup.zshExample (launch files will be provided):
ros2 launch dobot_bringup dobot_magician_control_system.launch.pySome commands may vary depending on your operating system.
Please refer to the official ROS 2 installation guide for details specific to your OS.
The current system integrates the Dobot Magician robotic arm with the ROS 2 Humble ecosystem, enabling control and communication between hardware and software components.
The project’s goal is to create an experimental scenario for object manipulation using ROS 2 nodes, topics, and services.
Below is a simplified diagram of the system’s structure and data flow:
Figure 1 — Overview of the current ROS 2 + Dobot Magician ecosystem. For a detailed technical explanation of the system, check the Technical Study.
The system is composed of multiple interconnected modules:
- ROS 2 Nodes: Handle robot control, command publishing, and data exchange.
- Dobot Interface (magician_ros2): Provides low-level communication between ROS 2 and the robotic arm.
- Pick-and-Place Scripts: Implement motion planning and execution for object manipulation.
- Workspace Definition: Defines safe areas, limits, and target positions for pick-and-place operations.
- Simulation Tools: Used to validate motion and workspace boundaries before executing on real hardware.
So far, the following scripts have been developed and tested:
move_linear.py→ Executes linear movements between Cartesian coordinates.move_relative.py→ Implements relative motion commands based on current position.dobot_diagnostic.py→ Performs a full system check on the Dobot Magician, verifying communication, calibration, and current position limits to ensure the robot is within its safe workspace.
Each script is modular and can be executed individually or integrated into a combined motion routine.
✅ ROS 2 environment successfully configured
✅ Dobot connection established and tested
✅ Basic movement and gripper control implemented
✅ Position validation
🔄 In progress: relative motion
🔜 Next steps: conveyor integration and object sorting automation
- The workspace boundaries and Cartesian coordinates are defined experimentally to avoid overextension of the Dobot’s servos.
- Testing is initially performed using RViz and Dobot Studio for safety before executing on the physical hardware.
- The modular node-based structure allows future integration with sensors or cameras (e.g., Kinect).
Every robotic arm needs a name — it’s the law of robotics (well, almost ).
In this project, the Dobot Magician was baptized as Ismaildo.
Feel free to choose your own… but beware, unnamed robots may refuse to cooperate!
