2D/6D Visual Grasping
1. Introduction
The Agile Follower Arm Control System is a complete ROS-based solution, specifically designed for our self-developed Agile series six-degree-of-freedom follower arm and gripper (reference: https://github.com/Xuanya-Robotics/Alicia_duo_ros1). The system provides standardized ROS interfaces, uses radians as the unified angle unit, simplifies robotic arm control processes, abstracts low-level communication details, allowing users to focus on upper-level application development. The core functionalities include:
-
Real-time control of six-degree-of-freedom robotic arm;
-
Precise control of gripper opening and closing;
-
Independent gripper control interface (new feature);
-
Real-time feedback of all joint states;
-
Standardized ROS interfaces;
-
Support for automatic serial port detection and reconnection;
-
Good cross-platform compatibility.
2. Single Follower Arm Data Reading and Control
Note:
Safety First: Always ensure there are no obstacles or other personnel in the robotic arm's workspace;
Angle Limits: All commands should be within valid ranges, particularly note that the gripper is limited to 0-100° (mechanical structure limitation);
Data Units: All APIs use radians as units, not degrees, requiring conversion using
math.radians()
andmath.degrees()
;Startup Sequence: Always start the control system first, then launch the application;
Serial Port Permissions: First-time use may require configuring serial port access permissions;
System Resources: Maintain normal operation of the ROS core system;
Use Ctrl+C to safely stop running nodes.
2.1 System Nodes
The system consists of four main nodes that together form a complete control chain:
Node Name | File | Function Description |
---|---|---|
Data Type Node | serial_data_type_node.py | Classifies and forwards raw data to corresponding processing nodes |
Servo State Node | servo_states_node.py | Processes hardware status data, converts to standard joint states |
Servo Control Node | servo_control_node.py | Receives standard joint commands, converts to hardware protocol format |
Serial Server Node | serial_server_node | Handles hardware communication, processes data frame transmission and reception |
Data flow diagram can be referenced:
2.2 Interface Specifications
2.2.1 Main Interfaces
Users only need to focus on the following three main interfaces:
Topic Name | Message Type | Direction | Description |
---|---|---|---|
/arm_joint_state | ArmJointState | Input (Subscribe) | Receives current robotic arm state |
/arm_joint_command | ArmJointState | Output (Publish) | Controls only the 6 joints of the robotic arm |
/gripper_control | Float32 | Output (Publish) | Controls gripper independently |
Note: Although the
/arm_joint_command
message includes a gripper field, this field is ignored in the current system implementation. You must use the/gripper_control
topic to control the gripper!
2.2.2 Message Type Definitions
The system uses a custom message type ArmJointState:
# Standard robotic arm joint state message (radian units)
Header header
# Six main joint angles (radians)
float32 joint1 # Joint 1, base rotation joint
float32 joint2 # Joint 2, shoulder joint
float32 joint3 # Joint 3, elbow joint
float32 joint4 # Joint 4, wrist rotation joint
float32 joint5 # Joint 5, wrist pitch joint
float32 joint6 # Joint 6, wrist roll joint
# Gripper angle (radians)
float32 gripper
# Optional motion control parameters
float32 time # Motion time (seconds), default 0 means execute immediately
2.2.3 Data Units and Limitations
All angle values use radians as the standard unit:
Parameter Name | Angle Range (rad) | Angle Range (°) | Note |
---|---|---|---|
joint1~joint6 | -π to +π | -180 to +180 | Values outside range will be automatically truncated |
gripper | 0 to 1.745 | 0 to 100 | Gripper-specific limit, values outside range will be truncated |
Note: Due to mechanical structure limitations, the gripper's angle range is 0 to 1.745 radians (i.e., 0 to 100°).
2.3 System Deployment and Launch
2.3.1 System Dependencies Installation
System Dependencies:
-
Ubuntu 20.04
-
ROS (Noetic or other ROS 1 versions)
-
Python 3.8
-
rosdepc
For rosdepc
installation, refer to the Fish-flavored ROS installation method:
https://blog.csdn.net/weixin_45291614/article/details/131530006
Workspace creation and dependency installation:
# Create workspace
mkdir -p ~/alicia_ws/src
cd ~/alicia_ws
git clone https://github.com/Xuanya-Robotics/Alicia_duo_ros1.git ./src/
# Install required dependencies
./src/install/alicia_amd64_install.sh
Set serial port permissions:
# Method 1: Add user to dialout group (recommended, permanent)
sudo usermod -a -G dialout $USER
# Note: Logout and login again for group permissions to take effect
# Method 2: Temporarily set serial port permissions
sudo chmod 666 /dev/ttyUSB*
# Method 3: Create udev rules (permanent)
echo 'KERNEL=="ttyUSB*", MODE="0666"' | sudo tee /etc/udev/rules.d/99-serial.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
Hardware Connection Verification
-
Connect the robotic arm to the computer via USB;
-
Check if the serial port is recognized by the system;
ls -l /dev/ttyUSB*
- Confirm the serial port device name (e.g., ttyUSB0, ttyUSB1, etc.).
2.3.2 Launch Commands
Use the following command to start the complete control system:
roslaunch alicia_duo_driver serial_server.launch
2.3.3 Configuration Parameters
The following parameters can be configured at launch:
# Enable debug mode
roslaunch alicia_duo_driver serial_server.launch debug_mode:=true
# Specify serial port device
roslaunch alicia_duo_driver serial_server.launch port:=ttyUSB0
# Set baud rate
roslaunch alicia_duo_driver serial_server.launch baudrate:=921600
# Combined parameters
roslaunch alicia_duo_driver serial_server.launch port:=ttyUSB0 debug_mode:=true baudrate:=921600
2.3.4 Launch File Parameter Description
Parameter Name | Default Value | Description |
---|---|---|
debug_mode | false | Whether to enable debug log output |
port | ttyUSB3 | Serial port device name, located under /dev/ |
baudrate | 921600 | Serial port baud rate |