rby1_sdk.DynamixelBus

class DynamixelBus

Bases: pybind11_object

Dynamixel bus communication interface.

This class provides low-level communication with Dynamixel servos including motor control, PID tuning, and status monitoring.

ProtocolVersion

Dynamixel protocol version (2.0).

Type:

float

DefaultBaudrate

Default communication baudrate (2000000).

Type:

int

AddrTorqueEnable

Memory address for torque enable/disable (64).

Type:

int

AddrPresentCurrent

Memory address for current reading (126).

Type:

int

AddrPresentVelocity

Memory address for velocity reading (128).

Type:

int

AddrPresentPosition

Memory address for position reading (132).

Type:

int

AddrGoalCurrent

Memory address for current goal setting (102).

Type:

int

AddrGoalPosition

Memory address for position goal setting (104).

Type:

int

AddrOperatingMode

Memory address for operating mode setting (11).

Type:

int

AddrPresentButtonState

Memory address for button state reading (12).

Type:

int

AddrGoalVibrationLevel

Memory address for vibration level setting (13).

Type:

int

AddrPositionPGain

Memory address for position P gain (80).

Type:

int

AddrPositionIGain

Memory address for position I gain (81).

Type:

int

AddrPositionDGain

Memory address for position D gain (82).

Type:

int

TorqueEnable

Value to enable torque (1).

Type:

int

TorqueDisable

Value to disable torque (0).

Type:

int

CurrentControlMode

Operating mode for current control (0).

Type:

int

CurrentBasedPositionControlMode

Operating mode for current-based position control (5).

Type:

int

AddrCurrentTemperature

Memory address for temperature reading (146).

Type:

int

__init__(self: rby1_sdk.DynamixelBus, dev_name: str) None

Construct a DynamixelBus instance.

Parameters:

dev_name (str) – Device name (e.g., “/dev/ttyUSB0” on Linux).

Methods

__init__(self, dev_name)

Construct a DynamixelBus instance.

get_motor_states(self, ids)

Get motor states for multiple motors.

get_position_d_gain(self, id)

Get position D gain for a motor.

get_position_i_gain(self, id)

Get position I gain for a motor.

get_position_p_gain(self, id)

Get position P gain for a motor.

get_position_pid_gain(self, id)

Get position PID gains for a motor.

group_fast_sync_read(self, ids, addr, len)

Perform fast synchronous read for multiple motors.

group_fast_sync_read_encoder(self, ids)

Perform fast synchronous read of encoder values.

group_fast_sync_read_operating_mode(self, ...)

Perform fast synchronous read of operating modes.

group_fast_sync_read_torque_enable(self, ids)

Perform fast synchronous read of torque enable states.

group_sync_write_operating_mode(self, ...)

Perform synchronous write of operating modes.

group_sync_write_send_position(self, ...)

Perform synchronous write of goal positions.

group_sync_write_send_torque(self, ...)

Perform synchronous write of torque commands.

group_sync_write_torque_enable(*args, **kwargs)

Overloaded function.

open_port(self)

Open the communication port.

ping(self, id)

Ping a motor to check if it's responding.

read_button_status(self, arg0)

Read button status from a device.

read_encoder(self, id)

Read encoder position for a motor.

read_operating_mode(self, id, use_cache)

Read operating mode for a motor.

read_temperature(self, id)

Read temperature for a motor.

read_torque_enable(self, id)

Read torque enable state for a motor.

send_current(self, id, current)

Send current command to a motor.

send_goal_position(self, id, goal_position)

Send goal position to a motor.

send_operating_mode(self, id, operating_mode)

Send operating mode to a motor.

send_torque(self, id, torque)

Send torque command to a motor.

send_torque_enable(self, id, onoff)

Enable or disable torque for a motor.

send_vibration(self, id, vibration)

Send vibration command to a device.

set_baud_rate(self, baudrate)

Set the communication baudrate.

set_position_d_gain(self, id, d_gain)

Set position D gain for a motor.

set_position_i_gain(self, id, i_gain)

Set position I gain for a motor.

set_position_p_gain(self, id, p_gain)

Set position P gain for a motor.

set_position_pid_gain(*args, **kwargs)

Overloaded function.

set_torque_constant(self, torque_constant)

Set torque constants for motors.

Attributes