How xarm-developer/xarm_ros2 works
Project type and purpose
• This is a “full-stack” ROS2 robotics framework (named xarm_ros2) that integrates robot description, simulation (Gazebo), motion planning (MoveIt2), control (ros2_control), API wrappers, and demonstration applications for the UFACTORY xArm series.
• It provides end-to-end support for real hardware and simulated robots: URDF/meshes → ROS nodes → controllers → planner → user interfaces (CLI, RViz, joystick, keyboard).
File structure
• Top-level packages (each a ROS2 or Python package):
• demo/mbot_demo – chassis+arm demo
• thirdparty/realsense_gazebo_plugin – Gazebo sensor plugin
• uf_ros_lib – common Python utilities and builder for MoveIt2 config
• xarm_msgs – ROS message/service definitions
• xarm_sdk – C++ SDK for low-level robot communication
• xarm_api – ROS service/topic wrapper around xarm_sdk
• xarm_controller – ros2_control hardware interface for real or fake robots
• xarm_description – URDF, SRDF, meshes, launch files for robot models
• xarm_gazebo – Gazebo world and plugin integration for simulation
• xarm_moveit_config – MoveIt2 configuration (planning pipelines, launch files, RViz)
• xarm_moveit_servo – Real-time servoing demo (joystick, keyboard) via moveit_servo
• xarm_planner – High-level planning node using MoveIt2 APIs and services
• Build and config files: CMakeLists.txt, package.xml, Python setup.py, YAML.
Extract architecture insights from README
• ROS2 Foxy–Rolling support, multiple branches
• Launch-driven architecture: each package exposes ROS2 launch points for simulation vs. real hardware
• Clear separation of concerns: description → Gazebo → controllers → API → planning → user interfaces
Detailed capture of essential elements
• Topics and services between them (e.g., /<hw_ns>/joint_states, trajectory execution interfaces)
• External dependencies (Gazebo, MoveIt2, controller_manager, xarm_sdk)
• Don’t omit uf_ros_lib or xarm_msgs—they are foundation blocks for message definitions and config building