This script is designed to control the Maple robot with multiple Dynamixel motors using ROS (Robot Operating System). The script listens to a ROS topic (/motion_command) for commands to move the robot based on predefined motion configurations stored in JSON files.
Before running this script, ensure that the following are installed and configured on your system:
-
ROS (Robot Operating System)
- Ensure ROS is installed and properly configured on the system. This repository has been tested on ROS Noetic.
-
Dynamixel SDK
- The script relies on the Dynamixel SDK to interface with the motors. For more details, refer to the official documentation: Dynamixel SDK Download.
-
Configuration Files
dr_r_config.py: This file defines the configuration parameters for the Maple robot.MotionLib: This directory contains JSON files with motion configurations. To add a new motion, follow the JSON file template to create a new file under theMotionLibdirectory. For file format details, refer tomotion.txtunder theMotionLibdirectory.
To see a demo of the Maple robot executing a motion:
Run the following command in your terminal:
rostopic pub /motion_command std_msgs/String "data: 'wave'"
This will trigger the robot to execute the motion defined in wave.json located in the MotionLib directory.