rby1_sdk.SE2VelocityCommandBuilder¶
- class SE2VelocityCommandBuilder¶
Bases:
pybind11_objectSE(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.