Utilities
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.
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 width
height (int): image height
fov (float): camera field of view in degrees
camera_position (List[float]): camera position (x,y,z) in airgen (NED frame)
camera_orientation_euler_pry (List[float]): camera orientation (pitch, roll, yaw) in degrees
camera_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
Convert pixel coordinates to 3D coordinates.
pose2vector
Transform a target direction represented in (pitch, roll, yaw)
in radians into a directional vector.
quat_wxyz_to_xyzw
rotate_xy
to_eularian_angles
vec2eulerangles
Vision
The vision
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
The trajectory
subsection of AirGen utilities focuses on waypoint-based path planning and trajectory generation.
Waypoint
calc_time
fit_min_snap_trajectory
joint
separate
rr_camera_capture_logger
Given a view space name (entity_path in Rerun), returns a function that logs camera data (pose and capture in AirGen’s 3D world coordinate) to that view space.
A callable function that logs camera data to the specified view space.
- Usage:
rr_log_airgen_image
Was this page helpful?