This repository contains example ROS 2 packages for STAR1 robot control, developed by RobotEra.
This repository includes the following packages:
star1_example: A metapackage containing example packages for STAR1 robotsimple_trajectory_server: A trajectory server implementation for basic motion controlxbot_common_interfaces: Common interface definitions used by STAR1 robotrl_controller: A real-time reinforcement learning (RL) controller implemented as a ROS 2 package.
The xbot_common_interfaces package defines:
- Custom messages for robot state and control
- Service definitions for robot operations
- Action definitions for motion control
The simple trajectory server provides basic trajectory execution capabilities:
- Supports different trajectory types (zero position, sinusoidal wave)
- Configurable joint control parameters
- Real-time execution feedback
- ROS 2 action server interface
This package uses a TorchScript neural network policy to generate precise motor commands for robotic platforms, processing multiple sensor inputs including IMU data, motor feedback, and remote control commands.
- Build the packages:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
- Launch control sdk
source install/setup.bash ros2 service call /dynamic_launch xbot_common_interfaces/srv/DynamicLaunch \ "app_name: '' sync_control: false launch_mode: 'pd'" ## replace `pd` with `no_hand_pd` if no hand on robot
- Switch robot to ready state
source your_ws/install/setup.bash ros2 service call /ready_service std_srvs/srv/Trigger {} - Run demo
- Simple trajectory
- Launch trajectory server
source install/setup.bash ros2 launch simple_trajectory_server simple_trajectory_server.launch.py- Execute zero trajectory
source install/setup.bash ros2 action send_goal /simple_trajectory_action xbot_common_interfaces/action/SimpleTrajectory "traj_type: 0 duration: 4.0"
- Execute sin wave trajectory
source install/setup.bash ros2 action send_goal /simple_trajectory_action xbot_common_interfaces/action/SimpleTrajectory "traj_type: 1 duration: 10.0"
- RL controller
- Switch robot to active state
source your_ws/install/setup.bash ros2 service call /activate_service std_srvs/srv/Trigger {} - Launch the controller:
source install/setup.bash ros2 launch rl_controller rl_controller.launch.py - Operate radiolink
- Switch robot to active state
- Simple trajectory
For technical support or business inquiries:
- Email: support@robotera.com
- Create an issue in this repository
RobotEra is dedicated to advancing humanoid robotics technology.We specialize in developing robust and versatile humanoid robots for real-world applications.
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.