rby1_sdk.SE2VelocityCommandBuilder#

class SE2VelocityCommandBuilder#

Bases: pybind11_object

SE(2) velocity command builder.

Defines planar velocity commands in SE(2) space (x, y translation and yaw rotation). The target velocity is reached by linear ramp-up/ramp-down subject to acceleration limits and the specified minimum execution time.

Examples

Move forward at 0.5 m/s while yawing at 0.2 rad/s, with limits and minimum time:

>>> import numpy as np, rby1_sdk as rby
>>> se2 = (
...     rby.SE2VelocityCommandBuilder()
...     .set_velocity(np.array([0.5, 0.0]), 0.2)        # [vx, vy], wz
...     .set_acceleration_limit(np.array([1.0, 1.0]), 0.5)
...     .set_minimum_time(1.0)
... )
>>> # (Optional) hold the commanded velocity after ramping:
>>> header = rby.CommandHeaderBuilder().set_control_hold_time(3.0)
>>> se2.set_command_header(header)
>>> cmd = rby.RobotCommandBuilder().set_command(
...     rby.ComponentBasedCommandBuilder().set_mobility_command(
...         rby.MobilityCommandBuilder().set_command(se2)
...     )
... )
>>> # robot.send_command(cmd, priority=1).get()
__init__(self: rby1_sdk.SE2VelocityCommandBuilder) None#

Construct an SE2VelocityCommandBuilder instance.

Methods

__init__(self)

Construct an SE2VelocityCommandBuilder instance.

set_acceleration_limit(self, linear, angular)

Set maximum acceleration limits for the SE(2) command.

set_command_header(self, command_header_builder)

Attach a command header.

set_minimum_time(self, minimum_time)

Set the minimum execution time.

set_velocity(self, linear, angular)

Set the target SE(2) velocity.

set_acceleration_limit(self: rby1_sdk.SE2VelocityCommandBuilder, linear: numpy.ndarray[numpy.float64[2, 1]], angular: float) rby1_sdk.SE2VelocityCommandBuilder#

Set maximum acceleration limits for the SE(2) command.

Parameters:
  • linear (numpy.ndarray, shape (2,), dtype=float64) – Maximum linear accelerations along x and y axes [m/s²].

  • angular (float) – Maximum angular acceleration around the z-axis [rad/s²].

Returns:

Self reference for method chaining.

Return type:

SE2VelocityCommandBuilder

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

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:

SE2VelocityCommandBuilder

set_minimum_time(self: rby1_sdk.SE2VelocityCommandBuilder, minimum_time: float) rby1_sdk.SE2VelocityCommandBuilder#

Set the minimum execution time.

Parameters:

minimum_time (float) – Minimum execution time [s]. Ensures the ramp toward the target velocity spans at least this duration.

Returns:

Self reference for method chaining.

Return type:

SE2VelocityCommandBuilder

set_velocity(self: rby1_sdk.SE2VelocityCommandBuilder, linear: numpy.ndarray[numpy.float64[2, 1]], angular: float) rby1_sdk.SE2VelocityCommandBuilder#

Set the target SE(2) velocity.

Parameters:
  • linear (numpy.ndarray, shape (2,), dtype=float64) – Linear velocity along x and y axes [m/s].

  • angular (float) – Angular velocity around the z-axis [rad/s].

Returns:

Self reference for method chaining.

Return type:

SE2VelocityCommandBuilder

Notes

  • To maintain the commanded velocity after reaching it, set a control hold time via CommandHeaderBuilder and attach it with set_command_header.