Home

Awesome

<a href="https://107-systems.org/"><img align="right" src="https://raw.githubusercontent.com/107-systems/.github/main/logo/107-systems.png" width="15%"></a> :floppy_disk: ros2_dynamixel_bridge

Build Status Spell Check status

This package provides the interface between ROS2 and Robotis Dynamixel servos.

<p align="center"> <a href="https://github.com/107-systems/l3xz"><img src="https://raw.githubusercontent.com/107-systems/.github/main/logo/l3xz-logo-memento-mori-github.png" width="40%"></a> </p>

How-to-build

cd $COLCON_WS/src
git clone --recursive https://github.com/107-systems/ros2_dynamixel_bridge
cd $COLCON_WS
source /opt/ros/humble/setup.bash
colcon build --packages-select ros2_dynamixel_bridge

How-to-run

cd $COLCON_WS
. install/setup.bash
ros2 launch ros2_dynamixel_bridge bridge-default.py

or

cd $COLCON_WS
ros2 launch ros2_dynamixel_bridge bridge-l3xz.py

Upon start-up the ROS2 node will scan the connected bus and automatically create topics for each discovered Robotis Dynamixel servo.

Interface Documentation

Subscribed Topics
Default nameTypeDescription
/dynamixel/servo_1/angle/targetstd_msgs/Float32Servo #1 target angle / rad
/dynamixel/servo_1/angular_velocity/targetstd_msgs/Float32Servo #1 target angular velocity / rad/sec
/dynamixel/servo_1/mode/setmsg/Mode.msgServo #1 operation mode (Position Control / Angular Velocity Control)
/dynamixel/servo_2/angle/targetstd_msgs/Float32Servo #2 target angle / rad
/dynamixel/servo_2/angular_velocity/targetstd_msgs/Float32Servo #2 target angular velocity / rad/sec
/dynamixel/servo_2/mode/setmsg/Mode.msgServo #2 operation mode (Position Control / Angular Velocity Control)
.........
/dynamixel/servo_n/angle/targetstd_msgs/Float32Servo #n target angle / rad
/dynamixel/servo_n/angular_velocity/targetstd_msgs/Float32Servo #n target angular velocity / rad/sec
/dynamixel/servo_n/mode/setmsg/Mode.msgServo #n operation mode (Position Control / Angular Velocity Control)
Published Topics
Default nameTypeDescription
/l3xz/ros2_dynamixel_bridge/heartbeatstd_msgs/UInt64Heartbeat signal containing the node uptime in seconds.
/dynamixel/servo_1/angle/actualstd_msgs/Float32Servo #1 current angle / rad
/dynamixel/servo_2/angle/actualstd_msgs/Float32Servo #1 current angle / rad
.........
/dynamixel/servo_n/angle/actualstd_msgs/Float32Servo #n current angle / rad
Parameters
NameDefaultDescription
serial_port/dev/ttyUSB0Serial port of RS485 bus.
serial_port_baudrate2 MbpsSerial baud rate of RS485 bus.
required_node_id_list{1, 2, 3, 4, 5, 6, 7, 8}A list of required Dynamixel servo IDs to be uncovered during startup.
check_required_node_id_listTrueIf this parameter is True then the discovered servo IDs are compared with the required_node_id_list during startup.