Skip to main content

Upper UserCmd State

After switching to the Upper UserCmd State, users can send external joint position commands for upper-body joints, as well as actuator configuration commands (e.g. PD parameters). The robot executes these commands and updates its state accordingly. Lower-body actuators are set to zero-torque mode.

State Details​

State NameTask NameJoystick MappingDDS MappingFrequency
Upper UserCmdUpperBodyUserCmdTaskNone11400Hz
Available for HangingAvailable for StandingAuto Protection Switch
YesNoNo

Joystick Control​

This state has no joystick control.

Client Control​

Velocity ControlPose ControlJoint ControlMotor Config
NoNoUpper bodyUpper body

Enter Upper UserCmd State​

After initializing AuroraCore, use the set_fsm_state function to enter the Upper UserCmd State.

Python
client = AuroraClient.get_instance(domain_id=123, robot_name="gr3")
time.sleep(1)

client.set_fsm_state(11) # switch to Upper UserCmd State

Joint Control​

Use set_group_cmd for joint control. Since position commands take effect immediately, interpolation is recommended to avoid sudden changes.

Available control groups: waist, head, left_manipulator, right_manipulator, left_endeffector, right_endeffector

Python
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)

Motor Configuration​

Use set_motor_cfg_pd to configure joint PD parameters.

Available control groups: waist, head, left_manipulator, right_manipulator

Python
kp_config = {
"waist": [200, 300, 200],
"head": [100, 100],
"left_manipulator": [400, 200, 200, 200, 50, 50, 50],
"right_manipulator": [400, 200, 200, 200, 50, 50, 50],
}
kd_config = {
"waist": [10, 15, 10],
"head": [10, 10],
"left_manipulator": [20, 10, 10, 10, 2.5, 2.5, 2.5],
"right_manipulator": [20, 10, 10, 10, 2.5, 2.5, 2.5],
}

client.set_motor_cfg_pd(kp_config, kd_config)