Skip to main content

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

A class to represent the position of the robot
required
x-coordinate value (meters)
required
y-coordinate value (meters)
required
z-coordinate value (meters)

Orientation

Inherits from: MessageType A class to represent the orientation as a quaternion

Orientation

Initialize orientation as a unit quaternion
required
x component of quaternion
required
y component of quaternion
required
z component of quaternion
required
w component of quaternion (scalar)

from_euler

Create orientation from Euler angles (roll, pitch, yaw)
required
roll angle around x-axis (radians)
required
pitch angle around y-axis (radians)
required
yaw angle around z-axis (radians)
Orientationquaternion representation of the orientation

Examples

to_euler

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

A class to represent the pose of the robot (Position and Orientation)
required
PositionThe x, y, z position of the robot
required
OrientationThe orientation as a quaternion

Velocity

Inherits from: MessageType A class to represent the velocity of the robot in NED frame

Velocity

A class to represent the velocity of the robot in NED frame
required
x-axis velocity (m/s)
required
y-axis velocity (m/s)
required
z-axis velocity (m/s)

Image

Inherits from: MessageType A class to represent an image

Image

A class to represent an image
required
image data
the parameters of image capture
required
type of the image (‘rgb’, ‘depth’, ‘segmentation’)

Twist

Inherits from: MessageType A class to represent angular and linear velocity in 3D space.

Twist

Initialize a Twist message
required
PositionThe linear velocity in x, y, z
required
PositionThe angular velocity in x, y, z

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

Initialize a point cloud object
required
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

Initialize the height map
required
2D array of height values
required
meters per cell
required
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