RL Locomotion State
The RL Locomotion State allows the robot to switch between arm-swing and joint control on the upper body while the lower body moves. The lower body runs a reinforcement-learning-based controller that allows velocity control in three directions.
The upper body is managed by the state manager task, allowing users to switch between different upper-body controllers:
- Default: no controller, mapped to upper-body state 0.
- UpperBodyActTask: arm-swing task, mapped to upper-body state 1.
- UpperBodyTeleTask: joint control task, mapped to upper-body state 2.
State Details
| State Name | Task Name | Joystick Mapping | DDS Mapping | Frequency |
|---|---|---|---|---|
| RL Locomotion | LowerBodyWbcrlTask / UpperBodyStateManagerTask | RB+A | 3 | 50Hz / 500Hz |
| Available for Hanging | Available for Standing | Auto Protection Switch |
|---|---|---|
| No | Yes | Yes |
Joystick Control
Enter RL Locomotion State
After initializing AuroraCore, press shoulder button RB and button A simultaneously to enter the RL Locomotion State.
Velocity Control
Use the left and right sticks to apply velocity control.
- Left stick vertical axis: forward and backward
- Left stick horizontal axis: left and right
- Right stick horizontal axis: turn left and right
Stand Pose Control
Use the D-pad to control the robot's stand pose.
- Press
UporDownto control the robot's height. - Press
LeftorRightto control the robot's pitch angle.
Arm-Swing Toggle
Press button B to enable arm swing, then press X to disable it.
Client Control
| Velocity Control | Pose Control | Joint Control | Motor Config |
|---|---|---|---|
| Yes | No | Upper body | No |
Enter RL Locomotion State
After initializing AuroraCore, use the set_fsm_state function to enter the RL Locomotion State.
client = AuroraClient.get_instance(domain_id=123, robot_name="gr3")
time.sleep(1)
client.set_fsm_state(3) # switch to RL Locomotion State
Velocity Control
Before sending velocity commands via the client, switch the velocity source. Set it to 2 (client control), then use set_velocity for velocity control.
Velocity range: vx: [-1.0, 1.0], vy: [-0.3, 0.3], vyaw: [-0.6, 0.6]
client.set_velocity_source(2) # set velocity source to client control
time.sleep(0.5)
client.set_velocity(0.3, 0.0, 0.0, 5.0) # move forward at 0.3 m/s for 5 s
time.sleep(5.0)
client.set_velocity(0.0, 0.3, 0.0, 5.0) # move left at 0.3 m/s for 5 s
time.sleep(5.0)
client.set_velocity(0.0, 0.0, 0.5, 5.0) # turn left at 0.5 rad/s for 5 s
time.sleep(5.0)
client.set_velocity(0.0, 0.0, 0.0, 1.0) # stop
Stand Pose Control
Use set_stand_pose for pose control.
Pose range: delta_z: [0.04, -0.48], delta_pitch: [-0.3, 0.5]
client.set_stand_pose(-0.1, 0.0, 0.0) # crouch 0.1 m
time.sleep(2.0)
client.set_stand_pose(0.0, 0.2, 0.0) # lean forward 0.2 rad
time.sleep(2.0)
client.set_stand_pose(0.0, 0.0, 0.0) # return to default
time.sleep(2.0)
Arm Swing
client.set_upper_fsm_state(1) # enable arm swing
Joint Control
To apply joint control in RL Locomotion state, switch the upper-body state to 2.
client.set_upper_fsm_state(2) # enable joint control
left_manipulator_init_pose = client.get_group_state("left_manipulator", key="position")
left_manipulator_target_pose = [0.0, 0.0, 0.0, -1.2, 0.0, 0.0, 0.0]
total_steps = 200
for i in range(total_steps):
left_manipulator_pose = [s + (e - s) * i / total_steps for s, e in zip(left_manipulator_init_pose, left_manipulator_target_pose)]
client.set_group_cmd({"left_manipulator": left_manipulator_pose})
time.sleep(0.01)
Available control groups: waist, head, left_manipulator, right_manipulator, left_endeffector, right_endeffector