__init__
LeggedClient.__init__(ip="", port=41481, timeout_value=3600)
All legged methods accept an optional
robot_name. When not supplied, AirGen targets the first configured robot (alphabetical order).getState
LeggedClient.getState(robot_name="")
setGaitAsync
LeggedClient.setGaitAsync(name, robot_name="")
simGetAllGaitNames
LeggedClient.simGetAllGaitNames(robot_name="")
rotateToYawAsync
LeggedClient.rotateToYawAsync(yaw, tolerance=5.0, yaw_rate=90.0, timeout_sec=3e38, robot_name="")
Rotates the robot to a specified yaw angle (world space) asynchronously using the given yaw_rate.Note: yaw_rate sign is ignored, and the robot will rotate in the shortest direction to reach the target yaw.
Arguments
The target yaw angle in degrees.
The acceptable deviation from the target yaw angle, in degrees. Defaults to 5.
Desired yaw rate in degrees/second.
The maximum time allowed for the rotation, in seconds. Defaults to 3e38.
The name of the robot to send this command to. Defaults to "".
rotateByYawRateAsync
LeggedClient.rotateByYawRateAsync(yaw_rate, duration, robot_name="")
Rotates the robot at a specified yaw rate asynchronously.
Arguments
moveOnPathAsync
LeggedClient.moveOnPathAsync(
path,
speed,
yaw_rate=90.0,
tolerance=0.5,
lookahead=-1,
adaptive_lookahead=1,
timeout_sec=3e38,
robot_name="",
)
Give a list of 3D points (local space), and the robot will move along that path at the specified speed and yaw_rate
Arguments
A list of 3D vectors (local NED) representing the path to follow.
The speed at which the robot should move along the path, in meters per second.
The maximum time allowed for the robot to reach the destination, in seconds.
The lookahead distance used for following the path. If less than 0, auto-lookahead is enabled. Must not be 0.
If greater than 0, adaptive lookahead is enabled; otherwise, it is disabled.
Desired yaw rate in degrees/second.
The acceptable distance from a waypoint at which the robot will consider the path completed.
The name of the robot being controlled, if applicable. Defaults to "".
moveByVelocityAsync
LeggedClient.moveByVelocityAsync(
vx,
vy,
vz,
duration,
yaw_rate=90.0,
orient_dir = Vector3r.ZERO,
robot_name="",
)
Move the robot with a given velocity, orientation direction and yaw_rate for a desired duration (seconds).Notes:
To prevent the robot from rotating, yaw_rate can be set to zero. For a non-zero yaw_rate, the following applies:
If orient_dir is not ZERO, the robot will orient towards it for the entire duration,
otherwise it’ll orient toward velocity’s direction instead.
Arguments
X component of desired velocity (local NED)
Y component of desired velocity (local NED)
Z component of desired velocity (local NED)
Desired amount of time (seconds), to move with the given velocity.
Desired yaw rate in degrees/second.
Desired orientation direction (local NED).
Name of the robot to send this command to.
moveByVelocityAsyncV
LeggedClient.moveByVelocityAsyncV(
velocity: Vector3r,
duration,
yaw_rate=90.0,
orient_dir=Vector3r.ZERO,
robot_name="",
)
Move the robot with a given velocity, orientation direction and yaw_rate for a desired duration (seconds).Notes:
To prevent the robot from rotating, yaw_rate can be set to zero. For a non-zero yaw_rate, the following applies:
If orient_dir is not ZERO, the robot will orient towards it for the entire duration,
otherwise it’ll orient toward velocity’s direction instead.
Arguments
Desired velocity (local NED)
Desired amount of time (seconds), to move with the given velocity.
Desired yaw rate in degrees/second.
Desired orientation direction (local NED).
Name of the robot to send this command to.
moveByVelocityBodyFrameAsync
LeggedClient.moveByVelocityBodyFrameAsync(
vx,
vy,
vz,
duration,
yaw_rate=90.0,
robot_name=""
)
Move the robot with a given velocity (body-frame) and yaw_rate for a desired duration (seconds)Notes:
The velocity vector is interpreted only at the moment the command starts.
It is not continuously rotated with the robot’s changing orientation.
In other words, the motion is just initialized in body frame, not “body-frame tracked” over time.
Arguments
X component of desired velocity in the robot’s body frame of reference
Y component of desired velocity in the robot’s body frame of reference
Z component of desired velocity in the robot’s body frame of reference
Desired amount of time (seconds), to move with the given velocity
Desired yaw rate in degrees/second.
Name of the robot to send this command to
moveByVelocityBodyFrameAsyncV
LeggedClient.moveByVelocityBodyFrameAsyncV(
velocity: Vector3r,
duration,
yaw_rate=90.0,
robot_name=""
)
Move the robot with a given velocity (body-frame) and yaw_rate for a desired duration (seconds)Notes:
The velocity vector is interpreted only at the moment the command starts.
It is not continuously rotated with the robot’s changing orientation.
In other words, the motion is just initialized in body frame, not “body-frame tracked” over time.
Arguments
moveToPositionAsync
LeggedClient.moveToPositionAsync(
x,
y,
z,
speed,
yaw_rate=90.0,
tolerance=0.5,
lookahead=-1,
adaptive_lookahead=1,
timeout_sec=3e38,
robot_name="",
)
Move the robot directly toward a desired position (local space) with a given speed and yaw_rate
Arguments
X component of desired position (local NED)
Y component of desired position (local NED)
Z component of desired position (local NED)
Desired speed in m/s.
Desired yaw rate in degrees/second.
The acceptable distance from the position at which the robot will consider the path completed.
The lookahead distance used for following the path. If less than 0, auto-lookahead is enabled. Must not be 0.
If greater than 0, adaptive lookahead is enabled; otherwise, it is disabled.
Maximum time allowed for the robot to reach the destination, in seconds.
Name of the robot
moveToPositionAsyncV
LeggedClient.moveToPositionAsyncV(
position: Vector3r,
speed,
yaw_rate=90.0,
tolerance=0.5,
lookahead=-1,
adaptive_lookahead=1,
timeout_sec=3e38,
robot_name=""
)
Move the robot directly toward a desired position (local space) with a given speed and yaw_rate
Arguments
Desired position (local NED)
Desired speed in m/s.
Desired yaw rate in degrees/second.
The acceptable distance from the position at which the robot will consider the path completed.
The lookahead distance used for following the path. If less than 0, auto-lookahead is enabled. Must not be 0.
If greater than 0, adaptive lookahead is enabled; otherwise, it is disabled.
Maximum time allowed for the robot to reach the destination, in seconds.
Name of the robot