Skip to main content

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:

  1. Safety First: Always ensure there are no obstacles or other personnel in the robotic arm's workspace;

  2. Angle Limits: All commands should be within valid ranges, particularly note that the gripper is limited to 0-100° (mechanical structure limitation);

  3. Data Units: All APIs use radians as units, not degrees, requiring conversion using math.radians() and math.degrees();

  4. Startup Sequence: Always start the control system first, then launch the application;

  5. Serial Port Permissions: First-time use may require configuring serial port access permissions;

  6. System Resources: Maintain normal operation of the ROS core system;

  7. 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 NameFileFunction Description
Data Type Nodeserial_data_type_node.pyClassifies and forwards raw data to corresponding processing nodes
Servo State Nodeservo_states_node.pyProcesses hardware status data, converts to standard joint states
Servo Control Nodeservo_control_node.pyReceives standard joint commands, converts to hardware protocol format
Serial Server Nodeserial_server_nodeHandles 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 NameMessage TypeDirectionDescription
/arm_joint_stateArmJointStateInput (Subscribe)Receives current robotic arm state
/arm_joint_commandArmJointStateOutput (Publish)Controls only the 6 joints of the robotic arm
/gripper_controlFloat32Output (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 NameAngle Range (rad)Angle Range (°)Note
joint1~joint6-π to +π-180 to +180Values outside range will be automatically truncated
gripper0 to 1.7450 to 100Gripper-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

  1. Connect the robotic arm to the computer via USB;

  2. 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 NameDefault ValueDescription
debug_modefalseWhether to enable debug log output
portttyUSB3Serial port device name, located under /dev/
baudrate921600Serial port baud rate