LeggedClient, which extends the base VehicleClient with legged-specific motion and gait APIs.
This guide walks through common control patterns for a legged agent: connecting to the simulator, switching gaits, issuing velocity or waypoint commands, and repositioning the robot with pose utilities.
Prerequisites
- A session configured with at least one quadruped (Ghost V60 or Unitree Go2), for example
quadruped0. - The AirGen Python package available inside your notebook or shell (
pip install pyairgenon GRID Enterprise, pre-installed on OpenGRID sessions).
Inspect Available Gaits
Legged locomotion is organized around named gaits. Query the scene to understand which options are available and activate the one you need.setGaitAsync returns a msgpackrpc.future.Future. Call .join() or .get() to wait for completion and capture success state.
Command Body Velocities
UsemoveByVelocityAsync to command linear velocities in the world (NED) frame while optionally spinning at a constant yaw rate.
vx,vy,vzare expressed in meters per second along world X (forward), Y (right), and Z (down).yaw_rateis in degrees per second; pass0.0to maintain heading.
Follow a Waypoint Path
To traverse a sequence of waypoints, supply a list ofVector3r world coordinates to moveOnPathAsync.
lookahead and adaptive_lookahead offer additional smoothing when following dense paths; refer to the LeggedClient reference for parameter definitions.
Relocate with Pose Utilities
When you need to reposition a legged robot instantly (for example, resetting a scenario), use the pose-setting APIs shared across robot types.simSetRobotPose operates in the world (NED) frame. For geodetic placement by latitude/longitude, convert to a GeoPose and call simSetRobotGeoPose as described in the GPS Navigation guide.
Combine with GPS Paths
Legged robots inherit the GPS helpers fromVehicleClient. This allows long-distance navigation driven by latitude/longitude waypoints.
With these primitives you can blend gait selection, world-frame velocities, and scripted path following to stage complex quadruped scenarios, all while using the same client infrastructure as multirotors and wheeled robots.