How ingjae/xarm_ros works
Main areas of functionality
• Robot Descriptions & Models: Packages like “xarm_description” contain URDF files, mesh files, inertial parameters, and configuration for different robot models.
• Simulation: “xarm_gazebo” provides Gazebo worlds, launch files, and simulation support. It integrates physics simulation and additional models such as grippers and camera modules.
• Low-Level Control & Bringup: “xarm_controller” and “xarm_bringup” provide the hardware interfaces, driver launch files, configuration for controllers (position, joint trajectory, velocity), and bringup of the real robot through ROS services.
• Motion Planning & MoveIt Integration: “xarm7_moveit_config”, “xarm_planner”, “xarm_moveit_servo”, etc. offer MoveIt configuration for planning, visualization on RViz, and real-time servo control (including online replanning modes). These packages restrict joint ranges and support custom TCP/tool models.
• API & Service Wrappers: “xarm_api” together with “xarm_msgs” expose the underlying SDK functions as ROS services. They cover joint/cartoesian motions, velocity control, error handling, I/O operations, and even tool (gripper/vacuum) control.
• External Modules & Vision Integration: The “xarm_vision” package and associated examples integrate external modules such as RealSense D435i, hand–eye calibration, and grasping demos. This part supports both sensor data streams and vision-guided robot control.
Relationships and Interactions
• At the bottom level, the xArm’s hardware is interfaced and controlled by the “xarm_controller” and “xarm_bringup” packages. They communicate directly with the robot’s driver board via low-level controllers.
• The “xarm_description” package is the foundation for both simulation and real operations; its URDF defines the robot’s kinematic and collision properties which are consumed by MoveIt! and Gazebo.
• Simulation components (“xarm_gazebo”) interact with the real world environment in Gazebo and receive motion commands from planning nodes.
• Motion planning and control components (“xarm7_moveit_config”, “xarm_planner”, “xarm_moveit_servo”) serve as the high‐level interface between a user or autonomous planner (for example using MoveIt!’s planning interface) and the low-level commands sent via the API.
• The “xarm_api” and “xarm_msgs” packages are middleware that convert user‐or higher-level commands into the specific SDK calls that operate the hardware which are then invoked via ROS service calls.
• Additional modules like “xarm_gripper” and vision packages add specialized functionality (end effector control and sensor feedback) that cross-connect with the main control and planning loops.
• Data and state feedback flows from the robot via topics (for example, “xarm/xarm_states”, “joint_states”, “controller_gpio_states”) to monitor status and errors. The “report_type” argument in launches further customizes the feedback frequency and richness.
Architectural Patterns and Design Principles
• MODULARITY: The system is split into clear packages – each with a dedicated purpose (robot description, simulation, hardware interfacing, planning, API messaging). This promotes ease of maintenance and allows users to swap simulation with real hardware.
• LAYERING: There is a clear separation between low-level hardware control (bringup, controller packages), high-level motion planning (MoveIt configurations, planner packages), and additional functionalities (vision, gripper control).
• CLIENT-SERVER & SERVICE ORIENTATION: ROS services (e.g., for motion commands, error clearing, I/O operations) and topics for state feedback provide a decoupled communication mechanism.
• EXTENSIBILITY: With numerous configuration files, launch scripts, and submodules (e.g., for different models and moveit setups), the system is designed to support numerous robot variants and functionalities (including dual robot configurations).
Relevant Technologies, Frameworks, and Libraries
• ROS (Robot Operating System) is the primary middleware.
• MoveIt! for motion planning, kinematic computation, and collision checking.
• Gazebo for simulation.
• CMake and catkin for building and dependency management.
• Custom SDK (xarm_ros C++/Python SDK) abstracted through the xarm_api.
• Additional sensor integration with RealSense and vision libraries (like aruco_ros and easy_handeye).