airsimdroneracinglab.types
¶
Module Contents¶
Classes¶
|
|
Type of DrivetrainType |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Struct YawMode with two fields, yaw_or_rate and is_rate. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Struct to store values of PID gains. Used to transmit controller gain values while instantiating |
|
Struct to contain controller gains used by angle level PID controller |
|
Struct to contain controller gains used by angle rate PID controller |
|
Struct to contain controller gains used by velocity PID controller |
|
Struct to contain controller gains used by position PID controller |
|
Struct to contain trajectory tracker gains used by the pure pursuit controller for moveBySpline and moveBySplineVelConstraints |
-
class
airsimdroneracinglab.types.
MsgpackMixin
¶ -
__repr__
(self)¶ - Returns
Description
- Return type
TYPE
-
to_msgpack
(self, *args, **kwargs)¶ - Parameters
*args – Description
**kwargs – Description
- Returns
Description
- Return type
TYPE
-
classmethod
from_msgpack
(cls, encoded)¶ - Parameters
encoded (TYPE) – Description
- Returns
Description
- Return type
TYPE
-
-
class
airsimdroneracinglab.types.
ImageType
¶ -
-
Scene
= 0¶
-
DepthPlanner
= 1¶
-
DepthPerspective
= 2¶
-
DepthVis
= 3¶
-
DisparityNormalized
= 4¶
-
Segmentation
= 5¶
-
SurfaceNormals
= 6¶
-
Infrared
= 7¶
-
-
class
airsimdroneracinglab.types.
DrivetrainType
¶ Type of DrivetrainType
-
MaxDegreeOfFreedom
= 0¶
-
ForwardOnly
= 1¶
-
-
class
airsimdroneracinglab.types.
WeatherParameter
¶ -
Rain
= 0¶
-
Roadwetness
= 1¶
-
Snow
= 2¶
-
RoadSnow
= 3¶
-
MapleLeaf
= 4¶
-
RoadLeaf
= 5¶
-
Dust
= 6¶
-
Fog
= 7¶
-
Enabled
= 8¶
-
-
class
airsimdroneracinglab.types.
Vector3r
(x_val=0.0, y_val=0.0, z_val=0.0)¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
x_val
= 0.0¶
-
y_val
= 0.0¶
-
z_val
= 0.0¶
-
static
nanVector3r
()¶ - Returns
Description
- Return type
TYPE
-
__add__
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
-
__sub__
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
-
__truediv__
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
__mul__
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
dot
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
cross
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
get_length
(self)¶ - Returns
Description
- Return type
TYPE
-
distance_to
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
-
to_Quaternionr
(self)¶ - Returns
Description
- Return type
TYPE
-
to_numpy_array
(self)¶ - Returns
Description
- Return type
TYPE
-
-
class
airsimdroneracinglab.types.
Quaternionr
(x_val=0.0, y_val=0.0, z_val=0.0, w_val=1.0)¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
w_val
= 0.0¶
-
x_val
= 0.0¶
-
y_val
= 0.0¶
-
z_val
= 0.0¶
-
static
nanQuaternionr
()¶ - Returns
Description
- Return type
TYPE
-
__add__
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
__mul__
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
__truediv__
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
dot
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
cross
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
outer_product
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
-
rotate
(self, other)¶ - Parameters
other (TYPE) – Description
- Returns
Description
- Return type
TYPE
- Raises
TypeError – Description
ValueError – Description
-
conjugate
(self)¶ - Returns
Description
- Return type
TYPE
-
star
(self)¶ - Returns
Description
- Return type
TYPE
-
inverse
(self)¶ - Returns
Description
- Return type
TYPE
-
sgn
(self)¶ - Returns
Description
- Return type
TYPE
-
to_numpy_array
(self)¶ - Returns
Description
- Return type
np.array
-
-
class
airsimdroneracinglab.types.
Pose
(position_val=Vector3r(), orientation_val=Quaternionr())¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
orientation
¶ Description
- Type
-
position
¶
-
orientation
¶
-
static
nanPose
()¶ - Returns
Description
- Return type
TYPE
-
-
class
airsimdroneracinglab.types.
CollisionInfo
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
impact_point
¶ Description
- Type
TYPE
-
normal
¶ Description
- Type
TYPE
-
position
¶ Description
- Type
TYPE
-
has_collided
= False¶
-
normal
¶
-
impact_point
¶
-
position
¶
-
penetration_depth
= 0.0¶
-
time_stamp
= 0.0¶
-
object_name
=¶
-
object_id
¶
-
-
class
airsimdroneracinglab.types.
GeoPoint
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
latitude
= 0.0¶
-
longitude
= 0.0¶
-
altitude
= 0.0¶
-
-
class
airsimdroneracinglab.types.
YawMode
(is_rate=True, yaw_or_rate=0.0)¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
Struct YawMode with two fields, yaw_or_rate and is_rate. If is_rate field is True then yaw_or_rate field is interpreted as angular velocity in degrees/sec, which means you want vehicle to rotate continuously around its axis at that angular velocity while moving.
If is_rate is False then yaw_or_rate is interpreted as angle in degrees, which means you want vehicle to rotate to specific angle (i.e. yaw) and keep that angle while moving.
When yaw_mode.is_rate == true, the drivetrain parameter shouldn’t be set to ForwardOnly because there’s a contradiction as we’re asking for the drone to keep front pointing ahead, but also rotate continuously. However if you have yaw_mode.is_rate = false in ForwardOnly mode then you can do some funky stuff. For example, you can have drone do circles and have yaw_or_rate set to 90 so camera is always pointed to center. In MaxDegreeofFreedom also you can get some funky stuff by setting yaw_mode.is_rate = true and say yaw_mode.yaw_or_rate = 20. This will cause drone to go in its path while rotating which may allow to do 360 scanning.
In most cases, you just don’t want yaw to change which you can do by setting yaw rate of 0. The shorthand for this is airsim.YawMode()
-
is_rate
¶ if True, yaw_or_rate is interpreted as angular velocity in degrees/sec, if False, yaw_or_rate is interpreted as angles in degrees,
- Type
-
yaw_or_rate
¶ value of desired yaw rate, or desired yaw angle. Interpretation depends upon is_rate
- Type
-
is_rate
= True¶
-
yaw_or_rate
= 0.0¶
-
-
class
airsimdroneracinglab.types.
RCData
(timestamp=0, pitch=0.0, roll=0.0, throttle=0.0, yaw=0.0, switch1=0, switch2=0, switch3=0, switch4=0, switch5=0, switch6=0, switch7=0, switch8=0, is_initialized=False, is_valid=False)¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
pitch
¶ Description
- Type
TYPE
-
roll
¶ Description
- Type
TYPE
-
switch1
¶ Description
- Type
TYPE
-
switch2
¶ Description
- Type
TYPE
-
switch3
¶ Description
- Type
TYPE
-
switch4
¶ Description
- Type
TYPE
-
switch5
¶ Description
- Type
TYPE
-
switch6
¶ Description
- Type
TYPE
-
switch7
¶ Description
- Type
TYPE
-
switch8
¶ Description
- Type
TYPE
-
throttle
¶ Description
- Type
TYPE
-
yaw
¶ Description
- Type
TYPE
-
timestamp
= 0¶
-
is_initialized
= False¶
-
is_valid
= False¶
-
-
class
airsimdroneracinglab.types.
ImageRequest
(camera_name, image_type, pixels_as_float=False, compress=True)¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
image_type
¶ Description
- Type
TYPE
-
camera_name
= 0¶
-
image_type
¶
-
pixels_as_float
= False¶
-
compress
= False¶
-
-
class
airsimdroneracinglab.types.
ImageResponse
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
camera_orientation
¶ Description
- Type
TYPE
-
camera_position
¶ Description
- Type
TYPE
-
image_data_uint8
¶ Description
- Type
TYPE
-
image_type
¶ Description
- Type
TYPE
-
time_stamp
¶ Description
- Type
TYPE
-
image_data_uint8
¶
-
image_data_float
= 0.0¶
-
camera_position
¶
-
camera_orientation
¶
-
time_stamp
¶
-
message
=¶
-
pixels_as_float
= 0.0¶
-
compress
= True¶
-
width
= 0¶
-
height
= 0¶
-
image_type
¶
-
-
class
airsimdroneracinglab.types.
CarControls
(throttle=0, steering=0, brake=0, handbrake=False, is_manual_gear=False, manual_gear=0, gear_immediate=True)¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
throttle
= 0.0¶
-
steering
= 0.0¶
-
brake
= 0.0¶
-
handbrake
= False¶
-
is_manual_gear
= False¶
-
manual_gear
= 0¶
-
gear_immediate
= True¶
-
set_throttle
(self, throttle_val, forward)¶
-
-
class
airsimdroneracinglab.types.
KinematicsState
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
orientation
¶ Description
- Type
-
position
¶
-
orientation
¶
-
linear_velocity
¶
-
angular_velocity
¶
-
linear_acceleration
¶
-
angular_acceleration
¶
-
-
class
airsimdroneracinglab.types.
EnvironmentState
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
position
¶
-
geo_point
¶
-
gravity
¶
-
air_pressure
= 0.0¶
-
temperature
= 0.0¶
-
air_density
= 0.0¶
-
-
class
airsimdroneracinglab.types.
CarState
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
speed
= 0.0¶
-
gear
= 0¶
-
rpm
= 0.0¶
-
maxrpm
= 0.0¶
-
handbrake
= False¶
-
collision
¶
-
kinematics_estimated
¶
-
timestamp
¶
-
-
class
airsimdroneracinglab.types.
MultirotorState
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
collision
¶ Description
- Type
-
kinematics_estimated
¶ Description
- Type
-
landed_state
¶ Description
- Type
LandedState.Landed
-
timestamp
¶ Description
- Type
np.uint64
-
collision
¶
-
kinematics_estimated
¶
-
gps_location
¶
-
timestamp
¶
-
landed_state
¶
-
rc_data
¶
-
-
class
airsimdroneracinglab.types.
ProjectionMatrix
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
matrix
¶
Description
- Type
-
matrix
= []¶
-
-
class
airsimdroneracinglab.types.
CameraInfo
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
pose
¶ Description
- Type
TYPE
-
proj_mat
¶ Description
- Type
TYPE
-
pose
¶
-
fov
¶
-
proj_mat
¶
-
-
class
airsimdroneracinglab.types.
LidarData
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
point_cloud
= 0.0¶
-
time_stamp
¶
-
pose
¶
-
-
class
airsimdroneracinglab.types.
ImuData
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
time_stamp
¶
-
orientation
¶
-
angular_velocity
¶
-
linear_acceleration
¶
-
-
class
airsimdroneracinglab.types.
BarometerData
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
time_stamp
¶
-
altitude
¶
-
pressure
¶
-
qnh
¶
-
-
class
airsimdroneracinglab.types.
MagnetometerData
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
time_stamp
¶
-
magnetic_field_body
¶
-
magnetic_field_covariance
= 0.0¶
-
-
class
airsimdroneracinglab.types.
GnssFixType
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
GNSS_FIX_NO_FIX
= 0¶
-
GNSS_FIX_TIME_ONLY
= 1¶
-
GNSS_FIX_2D_FIX
= 2¶
-
GNSS_FIX_3D_FIX
= 3¶
-
-
class
airsimdroneracinglab.types.
GnssReport
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
geo_point
¶
-
eph
= 0.0¶
-
epv
= 0.0¶
-
velocity
¶
-
fix_type
¶
-
time_utc
¶
-
-
class
airsimdroneracinglab.types.
GpsData
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
time_stamp
¶
-
gnss
¶
-
is_valid
= False¶
-
-
class
airsimdroneracinglab.types.
DistanceSensorData
¶ Bases:
airsimdroneracinglab.types.MsgpackMixin
-
time_stamp
¶
-
distance
¶
-
min_distance
¶
-
max_distance
¶
-
relative_pose
¶
-
-
class
airsimdroneracinglab.types.
PIDGains
(kp, ki, kd)¶ Struct to store values of PID gains. Used to transmit controller gain values while instantiating AngleLevel/AngleRate/Velocity/PositionControllerGains objects.
-
to_list
(self)¶
-
-
class
airsimdroneracinglab.types.
AngleRateControllerGains
(roll_gains=PIDGains(0.25, 0, 0), pitch_gains=PIDGains(0.25, 0, 0), yaw_gains=PIDGains(0.25, 0, 0))¶ Struct to contain controller gains used by angle level PID controller
-
to_lists
(self)¶
-
-
class
airsimdroneracinglab.types.
AngleLevelControllerGains
(roll_gains=PIDGains(2.5, 0, 0), pitch_gains=PIDGains(2.5, 0, 0), yaw_gains=PIDGains(2.5, 0, 0))¶ Struct to contain controller gains used by angle rate PID controller
-
to_lists
(self)¶
-
-
class
airsimdroneracinglab.types.
VelocityControllerGains
(x_gains=PIDGains(0.2, 0, 0), y_gains=PIDGains(0.2, 0, 0), z_gains=PIDGains(2.0, 2.0, 0))¶ Struct to contain controller gains used by velocity PID controller
-
to_lists
(self)¶
-
-
class
airsimdroneracinglab.types.
PositionControllerGains
(x_gains=PIDGains(0.25, 0, 0), y_gains=PIDGains(0.25, 0, 0), z_gains=PIDGains(0.25, 0, 0))¶ Struct to contain controller gains used by position PID controller
-
to_lists
(self)¶
-
-
class
airsimdroneracinglab.types.
TrajectoryTrackerGains
(kp_cross_track=7.5, kd_cross_track=0.0, kp_vel_cross_track=5.0, kd_vel_cross_track=0.0, kp_along_track=0.4, kd_along_track=0.0, kp_vel_along_track=0.04, kd_vel_along_track=0.0, kp_z_track=2.0, kd_z_track=0.0, kp_vel_z=0.4, kd_vel_z=0.0, kp_yaw=3.0, kd_yaw=0.1)¶ Struct to contain trajectory tracker gains used by the pure pursuit controller for moveBySpline and moveBySplineVelConstraints
-
kp_cross_track
¶ P gain for position error measured perpendicular to path tangent, or in the “cross track” direction
- Type
-
kd_cross_track
¶ D gain for position error measured perpendicular to path tangent, or in the “cross track” direction
- Type
-
kp_vel_cross_track
¶ P gain for velocity error measured perpendicular to path tangent, or in the “cross track” direction
- Type
-
kd_vel_cross_track
¶ D gain for velocity error measured perpendicular to path tangent, or in the “cross track” direction
- Type
-