This repository contains a suite of ROS 2 packages to work with the CM730 sub controller. More specifically, it is set up to work with a robot that has a combination of a CM-730 and Dynamixel motors (specifically MX-28s), such as the DARwIn-OP or derivatives. It should also work with (or be easy to adapt for) similar components/robots, that use the same Dynamixel protocol, such as the ROBOTIS OP2 with a CM-740, but this has not been tested.
The following diagram shows the different components of the suite and their interactions:
The individual nodes, described below, can be started separately, but you can start all nodes in the following ways:
-
Using
launch: thecm730_bringuppackage supplies a launch file that brings up all the nodes:ros2 launch cm730_bringup cm730_bringup.launch.pyThere is also a launch file that launches all the nodes except for the driver node. This is useful when you want to run the driver on the robot and all other nodes externally:
ros2 launch cm730_bringup cm730_bringup_nodriver.launch.py -
Using a composed executable: the
cm730_bringuppackage supplies an executable that runs all nodes in a single process. Because the nodes share the same memory space, this may be more efficient:ros2 run cm730_bringup cm730_composed
Performs the actual communication with the CM-730 over USB, exposes ROS 2 services that map to the Dynamixel serial protocol.
Runs a 125Hz loop that reads and writes to the cm730driver. It
transforms the raw byte messages from the driver to structured
CM730Info and MX28Info messages and publishes these (topics:
/cm730/cm730info and /cm730/mx28info). It also subscribes to the
/cm730/mx28command topic, to receive MX28Command messages that it
transforms into driver write requests.
Provides a higher level interface to servo motors than
cm730controller: rather than using raw bytes, it subscribes to
JointCommand messages that contain data in standard units (topic:
/cm730/joint_commands), and it transforms motor information messages
into standard ROS 2 sensor_msgs/JointState (topic: /joint_states)
messages, to be used for instance by ROS 2's robot_state_publisher
node.
Reads the values of the accelerometer and the gyrometer of the CM-730 and publishes them as an IMU standard message as topic /imu/data_raw.