Sensor Data Types
CompressedImage
class CompressedImage:
header: Header # Message header
format: str # Image format ("jpeg", "png")
data: list[int] # Image data (byte array)LaserScan
class LaserScan:
header: Header
angle_min: float # Start angle (radians)
angle_max: float # End angle (radians)
angle_increment: float # Angular increment (radians)
range_min: float # Minimum range (m)
range_max: float # Maximum range (m)
ranges: list[float] # Range data (m)
intensities: list[float] # Intensity dataImu
class Imu:
header: Header
orientation: Quaternion # Orientation
orientation_covariance: list[float] # Covariance of orientation estimate
angular_velocity: Vector3 # Angular velocity (rad/s)
angular_velocity_covariance: list[float] # Covariance of angular velocity
linear_acceleration: Vector3 # Linear acceleration (m/s^2)
linear_acceleration_covariance: list[float] # Covariance of linear accelerationJointState
class JointState:
header: Header
name: list[str] # Joint names
position: list[float] # Joint positions (radians)
velocity: list[float] # Joint velocities (rad/s)
effort: list[float] # Joint torques (Nm)Range
class Range:
header: Header
radiation_type: int # Radiation type (e.g., 0=ultrasound, 1=infrared)
field_of_view: float # Field of view (radians)
min_range: float # Minimum measurement distance (m)
max_range: float # Maximum measurement distance (m)
range: float # Current measurement distance (m)
variance: float # Measurement variancePointCloud2
class PointCloud2:
header: Header
height: int # Point cloud height (1 if unorganized)
width: int # Point cloud width (total number of points)
fields: list[PointField] # Field descriptions for each point (e.g., x, y, z, rgb)
is_bigendian: bool # Whether data is big-endian
point_step: int # Length of a single point in bytes
row_step: int # Length of a row in bytes
data: list[int] # Raw point cloud data (byte array)
is_dense: bool # True if no invalid points (NaN/inf)PointField
class PointField:
# --- Data Type Constants ---
INT8 = 1
UINT8 = 2
INT16 = 3
UINT16 = 4
INT32 = 5
UINT32 = 6
FLOAT32 = 7
FLOAT64 = 8
# --- Field Definitions ---
name: str # Field name (e.g., "x", "y", "z", "rgb")
offset: int # Offset of the field within a single point (bytes)
datatype: int # Data type of the field (use one of the constants above)
count: int # Number of elements in the field (e.g., 1 for 'x', and 1 for 'normal_x')