Skip to main content

Motor Configuration

set_motor_cfg_pd()​

Python
set_motor_cfg_pd(
kp_config: Dict[str, list[float]],
kd_config: Dict[str, list[float]]
)

Configures PD mode gains for specified joint groups.

GR-W does not support external parameter overrides

Gains of the current GR-W tasks come from task configuration files (e.g. pd_Kp/pd_Kd in upper_body_tele_task/config.yaml), and the state pages mark joint parameter control as unsupported. Write commands can be published and read back consistently, but the current tasks do not provide external gain overrides, so writing different values will not have the intended effect. Do not write values different from the currently effective ones on a GR-W.

ParameterTypeDescription
kp_configDict[str, list[float]]group name → proportional gain (Kp) list per joint
kd_configDict[str, list[float]]group name → derivative gain (Kd) list per joint

Each list length must match the number of joints in the corresponding group.

Example

Python
import os
import time

os.environ.setdefault("FASTDDS_BUILTIN_TRANSPORTS", "UDPv4") # required on the robot

from fourier_aurora_client import AuroraClient

client = AuroraClient.get_instance(domain_id=123, robot_name="grw")
try:
time.sleep(1.0)
# If you must call this API, only write back the current readings
# (equivalent parameters, no behavior change):
kp = client.get_group_motor_cfg("head", key="pd_kp")
kd = client.get_group_motor_cfg("head", key="pd_kd")
client.set_motor_cfg_pd(
kp_config={"head": kp},
kd_config={"head": kd},
)
finally:
client.close()

set_motor_cfg_pos()​

Python
set_motor_cfg_pos(
kp_config: Dict[str, list[float]],
ki_config: Dict[str, list[float]],
kd_config: Dict[str, list[float]]
)

Configures position mode PID gain parameters for specified joint groups. Like set_motor_cfg_pd(), the current GR-W tasks do not provide external parameter overrides — see the GR-W restriction above.

ParameterTypeDescription
kp_configDict[str, list[float]]group name → proportional gain (Kp) list per joint
ki_configDict[str, list[float]]group name → integral gain (Ki) list per joint
kd_configDict[str, list[float]]group name → derivative gain (Kd) list per joint

Example

Python
import os
import time

os.environ.setdefault("FASTDDS_BUILTIN_TRANSPORTS", "UDPv4") # required on the robot

from fourier_aurora_client import AuroraClient

client = AuroraClient.get_instance(domain_id=123, robot_name="grw")
try:
time.sleep(1.0)
# Again, only write back the current readings (equivalent parameters):
kp = client.get_group_motor_cfg("head", key="pos_kp")
ki = client.get_group_motor_cfg("head", key="pos_ki")
kd = client.get_group_motor_cfg("head", key="pos_kd")
client.set_motor_cfg_pos(
kp_config={"head": kp},
ki_config={"head": ki},
kd_config={"head": kd},
)
finally:
client.close()

get_group_motor_cfg()​

Python
get_group_motor_cfg(group_name: str, key: str = 'pd_kp') -> list[float]

Reads the current motor configuration for a specified joint group.

Only waist, head, left_manipulator, and right_manipulator publish queryable motor configuration on the current GR-W. left_end_effector and right_end_effector cannot be passed to this method.

ParameterTypeDescription
group_namestrJoint group name
keystrConfiguration item — see table below
key valueDescription
'pd_kp'PD mode proportional gain, default
'pd_kd'PD mode derivative gain
'pos_kp'Position mode proportional gain
'pos_ki'Position mode integral gain
'pos_kd'Position mode derivative gain

Example

Python
import os
import time

os.environ.setdefault("FASTDDS_BUILTIN_TRANSPORTS", "UDPv4") # required on the robot

from fourier_aurora_client import AuroraClient

client = AuroraClient.get_instance(domain_id=123, robot_name="grw")
try:
time.sleep(1.0) # wait for state data
kp = client.get_group_motor_cfg("waist", key="pd_kp")
kd = client.get_group_motor_cfg("waist", key="pd_kd")
print(f"waist PD gains: kp={kp}, kd={kd}")
finally:
client.close()