override_msgs Adapters
mosaicolabs.ros_bridge.adapters.override_msgs ¶
LidarAdapter ¶
Bases: PointCloudAdapterBase[Lidar]
Adapter for translating ROS PointCloud2 messages to Mosaico Lidar.
This Adapter needs to be specified in the field adapters_override of RosInjectionConfig.
Supported ROS Types:
translate
classmethod
¶
Translates a ROS message into a Mosaico Message.
Returns:
| Name | Type | Description |
|---|---|---|
Message |
Message
|
The translated message containing a |
Raises:
| Type | Description |
|---|---|
Exception
|
Wraps any translation error with context (topic name, timestamp). |
from_dict
classmethod
¶
Create a Lidar instance from a ROS message dictionary.
Example:
schema_metadata
classmethod
¶
Extract the ROS message specific schema metadata, if any.
ros_msg_type
abstractmethod
classmethod
¶
Returns the specific ROS message type handled by this adapter.
ontology_data_type
classmethod
¶
Returns the Ontology class type associated with this adapter.
decode
classmethod
¶
Deserialize the binary buffer of a ROS sensor_msgs/msg/PointCloud2 message into named field arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ros_data
|
dict
|
Raw ROS message payload. Relevant keys: |
required |
Returns:
| Type | Description |
|---|---|
dict[str, list]
|
Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a field exposes an unsupported |
RadarAdapter ¶
Bases: PointCloudAdapterBase[Radar]
Adapter for translating ROS PointCloud2 messages to Mosaico Radar.
This Adapter needs to be specified in the field adapters_override of RosInjectionConfig.
Supported ROS Types:
translate
classmethod
¶
Translates a ROS message into a Mosaico Message.
Returns:
| Name | Type | Description |
|---|---|---|
Message |
Message
|
The translated message containing a |
Raises:
| Type | Description |
|---|---|
Exception
|
Wraps any translation error with context (topic name, timestamp). |
from_dict
classmethod
¶
Create a Radar instance from a ROS message dictionary. Example:
schema_metadata
classmethod
¶
Extract the ROS message specific schema metadata, if any.
ros_msg_type
abstractmethod
classmethod
¶
Returns the specific ROS message type handled by this adapter.
ontology_data_type
classmethod
¶
Returns the Ontology class type associated with this adapter.
decode
classmethod
¶
Deserialize the binary buffer of a ROS sensor_msgs/msg/PointCloud2 message into named field arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ros_data
|
dict
|
Raw ROS message payload. Relevant keys: |
required |
Returns:
| Type | Description |
|---|---|
dict[str, list]
|
Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a field exposes an unsupported |
RGBDCameraAdapter ¶
Bases: PointCloudAdapterBase[RGBDCamera]
Adapter for translating ROS PointCloud2 messages to Mosaico RGBDCamera.
This Adapter needs to be specified in the field adapters_override of RosInjectionConfig.
Supported ROS Types:
translate
classmethod
¶
Translates a ROS message into a Mosaico Message.
Returns:
| Name | Type | Description |
|---|---|---|
Message |
Message
|
The translated message containing a |
Raises:
| Type | Description |
|---|---|
Exception
|
Wraps any translation error with context (topic name, timestamp). |
from_dict
classmethod
¶
Create a RGBDCamera instance from a ROS message dictionary.
Example:
schema_metadata
classmethod
¶
Extract the ROS message specific schema metadata, if any.
ros_msg_type
abstractmethod
classmethod
¶
Returns the specific ROS message type handled by this adapter.
ontology_data_type
classmethod
¶
Returns the Ontology class type associated with this adapter.
decode
classmethod
¶
Deserialize the binary buffer of a ROS sensor_msgs/msg/PointCloud2 message into named field arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ros_data
|
dict
|
Raw ROS message payload. Relevant keys: |
required |
Returns:
| Type | Description |
|---|---|
dict[str, list]
|
Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a field exposes an unsupported |
ToFCameraAdapter ¶
Bases: PointCloudAdapterBase[ToFCamera]
Adapter for translating ROS PointCloud2 messages to Mosaico ToFCamera.
This Adapter needs to be specified in the field adapters_override of RosInjectionConfig.
Supported ROS Types:
translate
classmethod
¶
Translates a ROS message into a Mosaico Message.
Returns:
| Name | Type | Description |
|---|---|---|
Message |
Message
|
The translated message containing a |
Raises:
| Type | Description |
|---|---|
Exception
|
Wraps any translation error with context (topic name, timestamp). |
from_dict
classmethod
¶
Create a ToFCamera instance from a ROS message dictionary.
Example:
schema_metadata
classmethod
¶
Extract the ROS message specific schema metadata, if any.
ros_msg_type
abstractmethod
classmethod
¶
Returns the specific ROS message type handled by this adapter.
ontology_data_type
classmethod
¶
Returns the Ontology class type associated with this adapter.
decode
classmethod
¶
Deserialize the binary buffer of a ROS sensor_msgs/msg/PointCloud2 message into named field arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ros_data
|
dict
|
Raw ROS message payload. Relevant keys: |
required |
Returns:
| Type | Description |
|---|---|
dict[str, list]
|
Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a field exposes an unsupported |
StereoCameraAdapter ¶
Bases: PointCloudAdapterBase[StereoCamera]
Adapter for translating ROS PointCloud2 messages to Mosaico StereoCamera.
This Adapter needs to be specified in the field adapters_override of RosInjectionConfig.
Supported ROS Types:
translate
classmethod
¶
Translates a ROS message into a Mosaico Message.
Returns:
| Name | Type | Description |
|---|---|---|
Message |
Message
|
The translated message containing a |
Raises:
| Type | Description |
|---|---|
Exception
|
Wraps any translation error with context (topic name, timestamp). |
from_dict
classmethod
¶
Create a StereoCamera instance from a ROS message dictionary.
Example:
schema_metadata
classmethod
¶
Extract the ROS message specific schema metadata, if any.
ros_msg_type
abstractmethod
classmethod
¶
Returns the specific ROS message type handled by this adapter.
ontology_data_type
classmethod
¶
Returns the Ontology class type associated with this adapter.
decode
classmethod
¶
Deserialize the binary buffer of a ROS sensor_msgs/msg/PointCloud2 message into named field arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ros_data
|
dict
|
Raw ROS message payload. Relevant keys: |
required |
Returns:
| Type | Description |
|---|---|
dict[str, list]
|
Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a field exposes an unsupported |