Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot
Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot
Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot
Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot

Repository Summary

Description ROS 2 control stack for Dobot Magician educational manipulator.
Checkout URI https://github.com/jkaniuka/magician_ros2.git
VCS Type git
VCS Version main
Last Updated 2024-04-29
Dev Status UNKNOWN
Released UNRELEASED
Tags robotics manipulator ros2 dobot ros2-humble educational-robot
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

README

ROS 2 control stack for Dobot Magician

License: MIT

Table of contents :clipboard:

Packages in the repository :open_file_folder:

  • dobot_bringup - launch files and parameters configuration (in YAML files)
  • dobot_control_panel - RQT plugin to control Dobot Magician robotic arm (as well as sliding rail)
  • dobot_demos - a collection of sample scripts for beginners (minimal working examples)
  • dobot_description - package containing URDF description of Dobot Magician together with meshes
  • dobot_diagnostics - aggregation and analysis of alarm states
  • dobot_driver - low-level Python interface to communicate with Dobot via serial port
  • dobot_end_effector - set of service servers allowing to control different kinds of end effectors
  • dobot_homing - tool for executing homing procedure of Dobot stepper motors
  • dobot_kinematics - implementation of forward and inverse kinematics to validate trajectory feasibility
  • dobot_motion - package containing action server to control motion of Dobot Magician (joint interpolated motion / linear motion)
  • dobot_msgs - package defining messages used by control stack
  • dobot_state_updater - package containing a node regularly retrieving information about the state of the robot (e.g. joint angles / TCP position)
  • dobot_visualization_tools - useful tools for visualization (e.g. trajectory / range) in form of RViZ markers

Installation :arrow_down:

Requirements

This control system requires a system setup with ROS 2. It is recommended to use Ubuntu 22.04 with ROS 2 Humble, however using Ubuntu 20.04 with ROS 2 Galactic should also work.

Install ROS 2 Humble Hawksbill

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).

Install additional modules and packages

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
:warning: After installing new RQT plugins run rqt --force-discover to make plugins visible in RQT GUI. This issue is further described here.

Create workspace for control system (build from source)

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

Access to serial ports

In order to communicate with the robot, access to serial ports is required. To be able to open serial ports without using sudo, you need to add yourself to the dialout group:

sudo usermod -a -G dialout <username>
# Relogin or reboot required!

:warning: The USB port to which Dobot Magician is connected is set by default to /dev/ttyUSB0 - you can change it in this file.

System startup :robot:

  1. Connect Dobot Magician with a USB cable to the computer and then turn it on.
  2. 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).
  3. From inside of the magician_ros2_control_system_ws directory, run . install/setup.bash to source your workspace.
  4. Launch entire control stack with ros2 launch dobot_bringup dobot_magician_control_system.launch.py.

Homing procedure

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

A homing_position parameter is assigned to the server node of the homing service, which allows you to determine the position reached by the manipulator after the procedure is completed. The following are examples of the commands for reading and setting parameters value.

``` ros2 param get /dobot_homing_srv homing_position
ros2 param set /dobot_homing_srv homing_position [150.0,0.0,100.0,0.0]

File truncated at 100 lines see the full file

Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot
Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot
Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot
Repo symbol

magician_ros2 repository

robotics manipulator ros2 dobot ros2-humble educational-robot