General
get_public_fields
list_to_2d_float_array
string_to_float_array
string_to_uint8_array
to_dict
to_str
vector3d2list
wait_key
write_file
Sensor
imagetype2request
Helper function to create an uncompressed AirGen ImageRequest for a given image type.
responses2images
Convert AirGen image responses to NumPy arrays.
Dict[str, np.ndarray]
A dictionary with keys corresponding to camera names and values as the images.image:
For ImageType.Scene, ImageType.DepthVis, ImageType.OpticalFlowVis, image data is RGB image, numpy array with dtype=np.uint8, shape=(height, width, 3)For ImageType.DepthPerspective, ImageType.DepthPlanar, ImageType.DisparityNormalized, image data is depth image in meters, numpy array with dtype=np.float32, shape=(height, width, 1)For ImageType.Segmentation, image data is array of objects’ SegmentationIDs, numpy array with dtype=np.uint8, shape=(height, width, 1)For ImageType.SurfaceNormals, image data is array of unit vector (normalized length), numpy array with dtype=np.float32, shape=(height, width, 3)For ImageType.OpticalFlow, image data is array of displacements in x,y directions, numpy array with dtype=np.float32, shape=(height, width, 2)For ImageType.Infrared, image data is array of infrared values (object’s SegmentationID for now), numpy array with dtype=np.uint8, shape=(height, width, 1)camera parameters:
width (int): image widthheight (int): image heightfov (float): camera field of view in degreescamera_position (List[float]): camera position (x,y,z) in airgen (NED frame)camera_orientation_euler_pry (List[float]): camera orientation (pitch, roll, yaw) in degreescamera_orientation_quat_wxyz (List[float]): camera orientation (w,x,y,z) in quaternion format
Mechanics
cameracoord2worldcoord
homo_coord_to_nonhome_coord
imagecoord2direction
Given camera parameters (position, pose, and FOV) and pixel coordinates, return the 3D direction of the pixel relative to the camera.
imagecoord2orientation
Given camera parameters (position, pose, and FOV) and pixel coordinates, return the 3D direction of the pixel relative to the camera, represented in yaw and pitch (absolute degrees).
imagecoord2pose
pose2vector
quat_wxyz_to_xyzw
rotate_xy
to_eularian_angles
vec2eulerangles
Vision
Thevision subsection of AirGen utilities provides essential functions for handling camera parameters and generating point clouds from depth images.
build_camera
build_camera_intrinsic
build_camera_inv_extrinsic
camera_unproject_depth
depth2pointcloud
Generates a point cloud from a depth image.
Trajectory
Thetrajectory subsection of AirGen utilities focuses on waypoint-based path planning and trajectory generation.