Modalai Drone
ModalaiDrone
Inherits from: AerialRobot
Instantiates a ModalaiDrone containing mavlink client for sending commands to real drone.
Additionally sets up video stream manager for handling RTSP streams from the drone.
clip_velocity
Clip the velocity to be less than the velocity limit value.
clipped velocity vector
getPosition
Get the current position of the drone with respect to the world coordinate.
getVelocity
Get the current velocity of the drone with respect to the world coordinate.
getYaw
Return the current yaw of the drone in radians. Yaw measures the rotation of the drone around the z axis of the aeronautical frame (right-handed, X front, Y right, Z down)
getOrientation
Return the current Orientation of the drone, these are internally stored as a quaternion (x, y, z, w) where w is the scalar component. These can be mapped to the euler angles in the aeronautical frame (right-handed, X front, Y right, Z down).
setYaw
Set the yaw (in radians) of the drone to the specified position. Yaw measures the rotation of the drone around the z-axis (downwards). The yaw is wrapped to stay within [-pi, pi].
setYawDelta
Set a yaw delta (in radians) for the drone to rotate to. Yaw measures the rotation of the drone around the z-axis (downwards). The resulting yaw will be wrapped to stay within [-pi, pi].
setYawRate
Set the yaw rate of the drone in radians/s. Yaw measures the rotation of the drone around the z-axis (downwards)
moveToPosition
Move the drone to position: (x_val, y_val, z_val) respect to the world coordinates in NED frame (right handed, z down).
If no_sideslip
is specified drone turns in direction of travel. Velocity is limited to be less than velocity limit value.
moveToPositionDelta
Move the drone by position_delta: (x_val, y_val, z_val) relative to the current location with respect to the
world coordinates in NED frame (right handed, z down). If no_sideslip
is specified drone turns in direction of
travel. Velocity is limited to be less than velocity limit value.
moveToGPS
Move the drone to GPS coordinate: (lat, lon, alt) with respect to world coordinates in WGS84 frame (right handed, z up).
By default altitude is relative to starting point, can be set to absolute MSL using alt_use_msl
.
Note that NO velocity limiting is applied beyond PX4 limitation; drone moves using internal position tracking.
moveByVelocity
Fly the drone with velocity
in NED frame (right-handed, X north, Y east, Z down) in meters/s.
If an optional duration
is given, the velocity command is held for the specified number of seconds during which the function is blocking.
After the duration is complete the final position is held.
If no duration is specified (default), the command is held until another position or velocity command is given.
If no_sideslip
is specified drone turns in direction of travel.
Velocity is limited to be less than velocity limit value.
takeoff
Takeoff the ModalAI drone. Starts by arming the drone. Holds final position after takeoff.
land
Land the ModalAI drone. Descends at 1m/s until reaching 2m altitude. Final descent is at 0.25m/s until 0.1m altitude, then sets 0.5m/s velocity down for 2s to ensure touchdown before disarming the drone. NOTE: altitude values are given relative to starting location.
getImage
return the image of camera(camera_name)
Was this page helpful?