Movement Module#
This module provides high-level movement controls for the dog robot.
Users should interact only with the MovementModule class to
command the robot. It wraps the underlying hardware interface and
performs safety checks to prevent unsafe motions.
- class go2.modules.movement.movement_module.MovementModule(hardware: HardwareInterfaceMovement)[source]#
Bases:
DogModuleUsers should not access or construct this class directly. Rather, they should access it through the
Go2Controllerinstance.Important
Virtual and native movement commands may not function exactly the same way. Their behavior is not fully transitive across backends, so they should be used with care when switching between them.
- Parameters:
hardware (HardwareInterfaceMovement) – The underlying movement hardware interface that communicates with the robot.
- auto_recovery_set(enabled: bool) None[source]#
Set auto recovery mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- back_flip() None[source]#
Command the robot to perform back flip.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- balance_stand() None[source]#
Command the robot to balance stand.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- classic_walk(flag: bool) None[source]#
Set classic walk mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- content() None[source]#
Command the robot to perform content.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- cross_step(flag: bool) None[source]#
Set cross step mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- damp() None[source]#
Command the robot to damp.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- dance1() None[source]#
Command the robot to perform dance1.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- dance2() None[source]#
Command the robot to perform dance2.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- euler(roll: float, pitch: float, yaw: float) None[source]#
Set the robot’s Euler angles.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- free_avoid(flag: bool) None[source]#
Set free avoid mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- free_bound(flag: bool) None[source]#
Set free bound mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- free_jump(flag: bool) None[source]#
Set free jump mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- free_walk() None[source]#
Command the robot to free walk.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- front_flip() None[source]#
Command the robot to perform front flip.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- front_jump() None[source]#
Command the robot to perform front jump.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- front_pounce() None[source]#
Command the robot to perform front pounce.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- get_auto_recovery() Tuple[int, bool | None][source]#
Get auto recovery status.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- hand_stand(flag: bool) None[source]#
Set hand stand mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- heart() None[source]#
Command the robot to perform heart.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- hello() None[source]#
Command the robot to perform hello.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- left_flip() None[source]#
Command the robot to perform left flip.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- move(amount_x: float = 0.0, amount_y: float = 0.0) None[source]#
Move the robot forward/backward and laterally.
- Parameters:
amount_x (float, optional) – Forward/backward movement amount. Positive is forward. Automatically clamped to [-max_translation, max_translation].
amount_y (float, optional) – Lateral movement amount. Positive is right. Automatically clamped to [-max_translation, max_translation].
Notes
Movements are relative to the robot’s current orientation.
- pose(flag: bool) None[source]#
Set pose mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- recovery_stand() None[source]#
Command the robot to recovery stand.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- rise_sit() None[source]#
Command the robot to rise from sit.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- rotate(amount: float) None[source]#
Rotate the robot around its yaw axis.
- Parameters:
amount (float) – Desired rotation amount. Automatically clamped to [-max_rotation, max_rotation].
Notes
The rotation is relative to the robot’s current orientation.
- scrape() None[source]#
Command the robot to scrape.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- sit() None[source]#
Command the robot to sit.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- speed_level(level: int) None[source]#
Set the robot’s speed level.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- stand_up() None[source]#
Command the robot to stand up.
Notes
It’s best practice to wait a second after standing up before issuing movement commands.
- static_walk() None[source]#
Command the robot to static walk.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- stop() None[source]#
Stop all robot movement immediately.
Notes
Can be called at any time to halt translation and rotation. Can be used to clear internal command buffer.
- stretch() None[source]#
Command the robot to stretch.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- switch_avoid_mode() None[source]#
Switch avoid mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- switch_joystick(on: bool) None[source]#
Switch joystick mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- trot_run() None[source]#
Command the robot to trot run.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
- walk_upright(flag: bool) None[source]#
Set walk upright mode.
Important
This command is not supported when
HardwareType.VIRTUALis selected and will raise NotImplementedError.
MovementModuleMovementModule.auto_recovery_set()MovementModule.back_flip()MovementModule.balance_stand()MovementModule.classic_walk()MovementModule.content()MovementModule.cross_step()MovementModule.damp()MovementModule.dance1()MovementModule.dance2()MovementModule.euler()MovementModule.free_avoid()MovementModule.free_bound()MovementModule.free_jump()MovementModule.free_walk()MovementModule.front_flip()MovementModule.front_jump()MovementModule.front_pounce()MovementModule.get_auto_recovery()MovementModule.hand_stand()MovementModule.heart()MovementModule.hello()MovementModule.left_flip()MovementModule.move()MovementModule.pose()MovementModule.recovery_stand()MovementModule.rise_sit()MovementModule.rotate()MovementModule.scrape()MovementModule.sit()MovementModule.speed_level()MovementModule.stand_down()MovementModule.stand_up()MovementModule.static_walk()MovementModule.stop()MovementModule.stretch()MovementModule.switch_avoid_mode()MovementModule.switch_joystick()MovementModule.trot_run()MovementModule.walk_upright()