MessageType
Message type for grid to enable message passing and consistency
MessageType
Generic class for any message type.
Position
Inherits from: MessageType
A class to represent the position of the robot
Position
Position(x_val: float, y_val: float, z_val: float)
A class to represent the position of the robot
x-coordinate value (meters)
y-coordinate value (meters)
z-coordinate value (meters)
Orientation
Inherits from: MessageType
A class to represent the orientation as a quaternion
Orientation
Orientation(x: float, y: float, z: float, w: float)
Initialize orientation as a unit quaternion
x component of quaternion
y component of quaternion
z component of quaternion
w component of quaternion (scalar)
from_euler
Orientation.from_euler(cls, roll: float, pitch: float, yaw: float)
Create orientation from Euler angles (roll, pitch, yaw)
roll angle around x-axis (radians)
pitch angle around y-axis (radians)
yaw angle around z-axis (radians)
Orientationquaternion representation of the orientation
Examples
>>> orientation = Orientation.from_euler(0, 0, 0)
to_euler
Orientation.to_euler(axes)
Convert quaternion to Euler angles (roll, pitch, yaw)
Euler angles in radians in (x, y, z) order
to_list
Convert orientation to a list of floats
List of floats representing the orientation
Pose
Inherits from: MessageType
A class to represent the pose of the robot (Position and Orientation)
Pose
Pose(position: Position, orientation: Orientation)
A class to represent the pose of the robot (Position and Orientation)
PositionThe x, y, z position of the robot orientation (Orientation)
Velocity
Inherits from: MessageType
A class to represent the velocity of the robot in NED frame
Velocity
Velocity(x_vel: float, y_vel: float, z_vel: float)
A class to represent the velocity of the robot in NED frame
Image
Inherits from: MessageType
A class to represent an image
Image
Image(data, capture_params: dict, img_type: str)
A class to represent an image
capture_params (dict), optional
the parameters of image capture
type of the image (‘rgb’, ‘depth’, ‘segmentation’)
Twist
Inherits from: MessageType
A class to represent angular and linear velocity in 3D space.
Twist
Twist(linear: Position, angular: Position)
Initialize a Twist message
to_dict
Convert to ROS message dictionary format
Dictionary matching ROS message format
PointCloud
Inherits from: MessageType
A class to represent a point cloud
PointCloud
PointCloud(points: np.ndarray, fields: list)
Initialize a point cloud object
Array of points with shape (N, 3+)
List of field names. Defaults to [‘x’, ‘y’, ‘z’]
HeightMap
Inherits from: MessageType
A class to represent a height map from LiDAR data
HeightMap
HeightMap(data: np.ndarray, resolution: float, origin: Position)
Initialize the height map
2D array of height values
Positionposition of the height map origin in world coordinates
process
Process the height map to return coordinates accounting for resolution and origin
Tuple containing:
np.ndarray: X coordinates grid
np.ndarray: Y coordinates grid
np.ndarray: Height values
Force
Inherits from: MessageType
Represents a force in 3D cartesian space (Newtons).
Force
Force(x: float, y: float, z: float)
Initialize a force vector.
x-component of force (Newtons)
y-component of force (Newtons)
z-component of force (Newtons)
Torque
Inherits from: MessageType
Represents a torque in 3D cartesian space (Newton-meters).
Torque
Torque(x: float, y: float, z: float)
Initialize a torque vector.
x-component of torque (Newton-meters)
y-component of torque (Newton-meters)
z-component of torque (Newton-meters)