This control system requires a system setup with ROS 2. It is recommended to use Ubuntu 22.04 with ROS 2 Humble. All of the software must be used on a Raspberry Pi connected to a webcam and on the same wifi network of the robotic arm. Also, the user has to know the robotic arm's IP in order to correctly modifiy the IP inside
src/dovot_driver/dovot_driver/dobot_handle.py
Follow the instructions from the link. There are 3 versions of ROS 2 Humble Hawksbill to choose from: Desktop Install, ROS-Base Install and Development tools Install. Be sure to install Desktop Install version (sudo apt install ros-humble-desktop).
All necessary modules are in requirements.txt, install using: pip3 install -r requirements.txt
Packages from apt repository: sudo apt install ros-humble-diagnostic-aggregator ros-humble-rqt-robot-monitor python3-pykdl
rqt --force-discover to make plugins visible in RQT GUI. This issue is further described here.
source /opt/ros/humble/setup.bash
mkdir -p ~/magician_ros2_control_system_ws/src
git clone https://github.com/jkaniuka/magician_ros2.git ~/magician_ros2_control_system_ws/src
cd magician_ros2_control_system_ws
rosdep install -i --from-path src --rosdistro humble -y
colcon build
- Connect Dobot Magician on the same network of the Raspberry and then turn it on.
- Set the MAGICIAN_TOOL environment variable describing the robot's configuration
export MAGICIAN_TOOL=<tool_type>(allowed values are: none, pen, suction_cup, gripper, extended_gripper). - From inside of the magician_ros2_control_system_ws directory, run
. install/setup.bashto source your workspace. - Launch entire control stack with
ros2 launch dobot_bringup dobot_magician_control_system.launch.py.
Homing should be performed as the first action after the system is started. It is necessary because an incremental encoder has been placed in the base of the manipulator, and the robot is not aware of its actual position when it is powered up. Stop all other scripts controlling the robot before starting the homing procedure.
Homing is handled by the service server, to start it run the following command:
ros2 service call /dobot_homing_service dobot_msgs/srv/ExecuteHomingProcedure
The following command is used to publish a "green" signal to the /semaphore topic, which allows the action server to start its execution:
ros2 topic pub --once /semaphore std_msgs/msg/String "{data: 'green'}"