The so_arm_100_hardware package provides a ROS 2 Control hardware interface plugin for the SO-ARM100 low-cost 5DoF robotic manipulator. This interface supports both direct serial communication with the physical robot and simulation via ROS topics.
- ROS 2 Control hardware interface implementation
- Configurable communication modes:
- Direct serial communication with the robot
- ROS topic-based communication for simulation
- Position control interface for all joints
- Thread-safe feedback handling
- Lifecycle-managed node implementation
- Name: so_arm_100_hardware
- Version: 0.0.0
- Description: ROS2 Control Hardware Interface for SO-ARM100 low-cost 5DoF robotic manipulator
- Maintainer: Bruk Gebregziabher (bruk@signalbotics.com)
- License: Apache-2.0
rclcpphardware_interfacepluginlibrclcpp_lifecyclesensor_msgs
The hardware interface communicates using the following ROS topics:
-
Command Topic:
command(sensor_msgs/msg/JointState)- Publishes joint position commands to the robot
-
Feedback Topic:
feedback(sensor_msgs/msg/JointState)- Subscribes to joint state feedback from the robot
The SOARM100Interface class implements:
- State and command interfaces for position control
- Lifecycle management (init, activate, deactivate)
- Read and write methods for communication
- Thread-safe feedback handling using mutex
- Asynchronous ROS communication using a dedicated executor thread
-
Clone the package into your ROS 2 workspace:
cd ~/ros2_ws/src git clone git@github.com:brukg/so_arm_100_hardware.git
-
Install dependencies:
cd ~/ros2_ws rosdep install --from-paths src --ignore-src -r -y
-
Build the package:
colcon build --packages-select so_arm_100_hardware
-
Source the workspace:
source install/setup.bash
Create a ROS 2 Control configuration file (YAML) that includes the hardware interface:
so_arm_100:
hardware_interface:
use_serial: true # Set to true for real robot, false for simulation
serial_port: "/dev/ttyUSB0" # Serial port for real robot
serial_baudrate: 1000000 # Serial baudrate
servo_speed: 2400 # Servo speed in ticks / second
servo_acceleration: 50 # Servo acceleration in ticks / second / secondWhen using serial communication (use_serial: true):
- Ensure the robot is connected to the specified serial port
- Grant serial port access permissions:
sudo usermod -a -G dialout $USER # Log out and back in after this- Verify the serial port and baudrate settings match your robot's configuration
When using topic communication (use_serial: false):
- Commands are published to the "command" topic
- Feedback is received from the "feedback" topic
- Both topics use the
sensor_msgs/JointStatemessage type
The hardware interface includes serial communication code that can be enabled for direct hardware control. By default, it operates using ROS topics for command and feedback.
- Check serial port permissions
- Verify the correct port is specified in the config
- Ensure the baudrate matches the robot's settings
- Check serial cable connections
- Verify topics are being published/subscribed:
ros2 topic list
ros2 topic echo /command
ros2 topic echo /feedback- Check for any error messages in the logs:
ros2 run rqt_console rqt_console- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This package is licensed under the Apache License 2.0. See the LICENSE file for details.
- so_100_arm: Main robot package