rby1_sdk.GravityCompensationCommandBuilder

class GravityCompensationCommandBuilder

Bases: pybind11_object

Gravity compensation command builder.

Creates a command that enables or disables gravity compensation on a component (e.g., an arm or the whole body). When enabled, the controller generates feed-forward torques to cancel the effect of gravity so the robot feels weightless.

Examples

>>> import rby1_sdk as rby
>>> # Enable gravity compensation for the right arm
>>> gc = rby.GravityCompensationCommandBuilder().set_on(True)
>>> cmd = rby.RobotCommandBuilder().set_command(
...     rby.ArmCommandBuilder().set_command(gc)
... )
>>> # robot.send_command(cmd, priority=1).get()
__init__(self: rby1_sdk.GravityCompensationCommandBuilder) None

Construct a GravityCompensationCommandBuilder instance.

Methods

__init__(self)

Construct a GravityCompensationCommandBuilder instance.

set_command_header(self, command_header_builder)

Attach a command header.

set_on(self, on)

Enable or disable gravity compensation.