MCPcopy Create free account
hub / github.com/RoboVerseOrg/RoboVerse / create_zero_cmd

Function create_zero_cmd

scripts/unitree_deploy/common/command_helper.py:25–33  ·  view source on GitHub ↗

Zero out all fields in the command.

(cmd: LowCmdGo | LowCmdHG)

Source from the content-addressed store, hash-verified

23
24
25def create_zero_cmd(cmd: LowCmdGo | LowCmdHG):
26 """Zero out all fields in the command."""
27 size = len(cmd.motor_cmd)
28 for i in range(size):
29 cmd.motor_cmd[i].q = 0
30 cmd.motor_cmd[i].qd = 0
31 cmd.motor_cmd[i].kp = 0
32 cmd.motor_cmd[i].kd = 0
33 cmd.motor_cmd[i].tau = 0
34
35
36def init_cmd_hg(cmd: LowCmdHG, mode_machine: int, mode_pr: int):

Callers 1

zero_torque_stateMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected