Supported ROS2 Messages

Supported ROS2 Messages#

Kompass components create automatic subscribers and callbacks to all inputs and publishers to all outputs. Kompass comes with a set of supported message types; each supported type has an associated callback and publisher.

Tip

Access all callbacks in a component in self.callbacks: Dict[str, GenericCallback] and get the topic incoming message using get_output method in the callback class

Tip

Access all publishers in a BaseComponent in self.publishers_dict: Dict[str, Publisher] and publish a new message to the topic using publish method in the publisher class

Below is a list of supported messages and the types accepted by their publishers publish method and returned by their callback get_output method:

Message

ROS2 package

Callback return type

Publisher converts from

String

std_msgs

str

str

Bool

std_msgs

bool

bool

Float32

std_msgs

float

float

Float64

std_msgs

float

float

Point

geometry_msgs

kompass_core.models.RobotState

numpy.ndarray

PointStamped

geometry_msgs

kompass_core.models.RobotState

numpy.ndarray

Pose

geometry_msgs

kompass_core.models.RobotState

numpy.ndarray

PoseStamped

geometry_msgs

kompass_core.models.RobotState

numpy.ndarray

Twist

geometry_msgs

geometry_msgs.msg.Twist

geometry_msgs.msg.Twist

TwistArray

kompass_interfaces

kompass_interfaces.msg.TwistArray

kompass_interfaces.msg.TwistArray

Image

sensor_msgs

numpy.ndarray

numpy.ndarray

Audio

sensor_msgs

bytes

str | bytes

Odometry

nav_msgs

kompass_core.models.RobotState

kompass_core.models.RobotState

LaserScan

sensor_msgs

kompass_core.datatypes.LaserScanData

kompass_core.datatypes.LaserScanData

PointCloud2

sensor_msgs

kompass_core.datatypes.PointCloudData

sensor_msgs.msg.PointCloud2

Path

nav_msgs

nav_msgs.msg.Path

nav_msgs.msg.Path

OccupancyGrid

nav_msgs

nav_msgs.msg.OccupancyGrid | np.ndarray | Dict

numpy.ndarray

ComponentStatus

ros_sugar_interfaces

ros_sugar_interfaces.msg.ComponentStatus

ros_sugar_interfaces.msg.ComponentStatus