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.

set_command_header(self: rby1_sdk.GravityCompensationCommandBuilder, command_header_builder: rby1_sdk.CommandHeaderBuilder) rby1_sdk.GravityCompensationCommandBuilder#

Attach a command header.

Parameters:

command_header_builder (CommandHeaderBuilder) – Command header configuration (e.g., control hold time).

Returns:

Self reference for method chaining.

Return type:

GravityCompensationCommandBuilder

set_on(self: rby1_sdk.GravityCompensationCommandBuilder, on: bool) rby1_sdk.GravityCompensationCommandBuilder#

Enable or disable gravity compensation.

Parameters:

on (bool) – True to enable gravity compensation, False to disable.

Returns:

Self reference for method chaining.

Return type:

GravityCompensationCommandBuilder