rby1_sdk.math#

Math module for RB-Y1.

Provides mathematical operations including Lie group operations, transformations, and other mathematical utilities.

Classes

TrapezoidalMotionGenerator

Trapezoidal motion generator for smooth trajectory planning.

class TrapezoidalMotionGenerator#

Bases: pybind11_object

Trapezoidal motion generator for smooth trajectory planning.

This class generates smooth trapezoidal velocity profiles for multi-joint robot motion, ensuring velocity and acceleration limits are respected.

Parameters:

max_iter (int, optional) – Maximum number of iterations for optimization. Default is 30.

Input#

Input parameters for motion generation.

Type:

class

Output#

Output trajectory data.

Type:

class

Coeff#

Spline coefficients for trajectory segments.

Type:

class

class Coeff#

Bases: pybind11_object

Spline coefficients for trajectory segments.

start_t#

Start time of the segment (in seconds).

Type:

float

end_t#

End time of the segment (in seconds).

Type:

float

init_p#

Initial position for the segment.

Type:

float

init_v#

Initial velocity for the segment.

Type:

float

a#

Constant acceleration for the segment.

Type:

float

property a#
property end_t#
property init_p#
property init_v#
property start_t#
class Input#

Bases: pybind11_object

Input parameters for trapezoidal motion generation.

current_position#

Current joint positions.

Type:

numpy.ndarray, shape (N,), dtype=float64

current_velocity#

Current joint velocities.

Type:

numpy.ndarray, shape (N,), dtype=float64

target_position#

Target joint positions.

Type:

numpy.ndarray, shape (N,), dtype=float64

velocity_limit#

Maximum allowed velocities for each joint.

Type:

numpy.ndarray, shape (N,), dtype=float64

acceleration_limit#

Maximum allowed accelerations for each joint.

Type:

numpy.ndarray, shape (N,), dtype=float64

minimum_time#

Minimum time constraint for the motion in seconds. This parameter provides an additional degree of freedom to control the arrival time to a target. Instead of relying solely on velocity/acceleration limits, you can set high limits and control the arrival time using minimum_time. For streaming commands, this helps ensure continuous motion by preventing the robot from stopping if it arrives too early before the next command.

Type:

float

property acceleration_limit#
property current_position#
property current_velocity#
property minimum_time#
property target_position#
property velocity_limit#
class Output#

Bases: pybind11_object

Output trajectory data from motion generation.

position#

Joint positions at the specified time.

Type:

numpy.ndarray, shape (N,), dtype=float64

velocity#

Joint velocities at the specified time.

Type:

numpy.ndarray, shape (N,), dtype=float64

acceleration#

Joint accelerations at the specified time.

Type:

numpy.ndarray, shape (N,), dtype=float64

property acceleration#
property position#
property velocity#
at_time(self: rby1_sdk.math.TrapezoidalMotionGenerator, t: float) rby1_sdk.math.TrapezoidalMotionGenerator.Output#

Get trajectory output at the specified time.

Parameters:

t (float) – Time at which to evaluate the trajectory.

Returns:

Trajectory data at time t.

Return type:

Output

Raises:

RuntimeError – If the motion generator is not initialized.

get_total_time(self: rby1_sdk.math.TrapezoidalMotionGenerator) float#

Get the total time for the generated trajectory.

Returns:

Total trajectory time in seconds.

Return type:

float

update(self: rby1_sdk.math.TrapezoidalMotionGenerator, input: rby1_sdk.math.TrapezoidalMotionGenerator.Input) None#

Update the motion generator with new input parameters.

Parameters:

input (Input) – Input parameters for motion generation.

Raises:

ValueError – If input argument sizes are inconsistent.