Documentation Index
Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
Use this file to discover all available pages before exploring further.
AirGenDrone
Inherits from: AerialDrone
AirGen simulation multirotor drone implementation.
This class provides an interface to control simulated multirotor drones in AirGen
using the MultirotorClient from the pyairgen library.
Inherited methods
init
AirGenDrone.__init__(ip: str = '127.0.0.1', port: int = 41461, timeout_value: int = 3600, vehicle_name: str = '')
Initialize a simulated AirGen multirotor client.
IP address of the AirGen server. (default: “127.0.0.1”)
Port number for the AirGen server. (default: 41461)
Timeout value for the connection in seconds. (default: 3600)
Name of the vehicle in the simulation. (default: "")
takeoff
AirGenDrone.takeoff() -> None
Command the drone to take off and hover.
land
AirGenDrone.land() -> None
Command the drone to land at its current position.
getState
AirGenDrone.getState() -> dict
Get the current state of the drone.
Current state including position, orientation, and velocity.
getImage
AirGenDrone.getImage(camera_name: str = 'front_center', image_type: str = 'rgb') -> Image
Get an image from the specified camera.
Name of the camera in the AirGen scene. (default: “front_center”)
Image type, one of (“rgb”|“depth”). (default: “rgb”)
Captured image wrapped in the project’s Image type.
getPosition
AirGenDrone.getPosition() -> Optional[Position]
Get the position of the drone in the world frame.
Current position of the drone in world coordinates.
getOrientation
AirGenDrone.getOrientation() -> Optional[Orientation]
Get the orientation of the drone in the world frame.
Current orientation as a quaternion (x, y, z, w).
moveToPosition
AirGenDrone.moveToPosition(position: Position, velocity: float, timeout_sec: float = 60) -> None
Move the drone to a specified position in the world frame.
Target position in meters (x, y, z).
Timeout for the operation in seconds. (default: 60)
moveByVelocity
AirGenDrone.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, duration: float = 1.0, frame: str = 'body') -> None
Move the drone with a velocity command in m/s.
The command applies for the given duration. For the body frame, velocity is
relative to the drone’s orientation. For the world frame, velocity is in the
global coordinate system.
linear_velocity (Velocity)
Linear velocity in m/s (x, y, z).
angular_velocity (Velocity)
Angular velocity in rad/s (z_vel/yaw rate is used).
Duration in seconds for the command to apply. (default: 1.0)
Reference frame for velocity (“body” or “world”). (default: “body”)
cleanup
AirGenDrone.cleanup() -> None
Clean up resources and disarm the drone.
stop
AirGenDrone.stop() -> None
Stop the drone by commanding zero velocity.