Skip to content

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

translate(ros_msg, **kwargs)

Translates a ROS message into a Mosaico Message.

Returns:

Name Type Description
Message Message

The translated message containing a Lidar object.

Raises:

Type Description
Exception

Wraps any translation error with context (topic name, timestamp).

from_dict classmethod

from_dict(ros_data)

Create a Lidar instance from a ROS message dictionary.

Example:

ros_data = {
    "height": 1,
    "width": 3,
    "fields": [...],
    "is_bigendian": False,
    "point_step": 16,
    "row_step": 48,
    "data": [...],
    "is_dense": True,
}
# Automatically resolves to a flat Mosaico Lidar with attached data
mosaico_lidar = LidarAdapter.from_dict(ros_data)

schema_metadata classmethod

schema_metadata(typestore, ros_msg_type, ros_version)

Extract the ROS message specific schema metadata, if any.

Parameters:

Name Type Description Default
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type str

The ROS message type to extract metadata for.

required
ros_version int

The ROS version (1 or 2) to consider for metadata extraction.

required

Returns:

Type Description
Optional[dict]

Optional[dict]: A dictionary containing the schema metadata, or None if not applicable.

ros_msg_type abstractmethod classmethod

ros_msg_type()

Returns the specific ROS message type handled by this adapter.

is_rosmsg_type_valid classmethod

is_rosmsg_type_valid(type_to_validate)

Checks whether a given ROS message type string is handled by this adapter.

Parameters:

Name Type Description Default
type_to_validate str

The full ROS message type string to check (e.g., "sensor_msgs/msg/Imu").

required

Returns:

Name Type Description
bool bool

True if the adapter supports this type, False otherwise.

unpack_mosaico_msg classmethod

unpack_mosaico_msg(mosaico_msg)

Extracts the typed Mosaico payload and its Header (if present) from a wrapped or bare message.

Handles two input cases:

  • Message wrapper: the typed data is extracted via get_data().
  • Raw ontology instance: returned as-is with

the Header is extracted from the ontology (if supported), otherwise an default Header (empty frame_id and zero Time) is returned.

Parameters:

Name Type Description Default
mosaico_msg Union[Message, T]

Either a Message envelope or a raw instance of cls.__mosaico_ontology_type__.

required

Returns:

Type Description
T

tuple[T, Header]: A (data, header) tuple where data is the typed ontology object and

Header

header is the corresponding Header, or a default Header (empty frame_id and

tuple[T, Header]

zero Time) if not present.

Raises:

Type Description
TypeError

If mosaico_msg is neither a Message nor an instance of the expected ontology type.

to_ros classmethod

to_ros(mosaico_data, typestore, ros_msg_type=None)

Converts a Mosaico PointCloudModel subtype (or a Message wrapping one) into a sensor_msgs/msg/PointCloud2 message.

Fields are serialized via :meth:encode. Only non-None model fields are included in the output point cloud.

Parameters:

Name Type Description Default
mosaico_data Union[Message, PointCloudModel]

A Message wrapping a PointCloudModel instance, or a raw PointCloudModel directly.

required
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type Optional[str]

Override for the output ROS type. Only sensor_msgs/msg/PointCloud2 is supported.

None

Returns:

Name Type Description
MsgType MsgType

A sensor_msgs/msg/PointCloud2 instance, or raises an error if:

  • the ros_msg_type is unsupported by adapter (TypeError)
  • the ros_msg_type or default type are unsupported by typestore (TypeError)
  • the ros_msg_type or default type are supported but translation is not implemented (NotImplementedError)

ontology_data_type classmethod

ontology_data_type()

Returns the Ontology class type associated with this adapter.

decode classmethod

decode(ros_data)

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: data, height, width, fields, is_bigendian, point_step.

required

Returns:

Type Description
dict[str, list]

dict[str, list]: Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if height * width == 0.

Raises:

Type Description
ValueError

If a field exposes an unsupported datatype.

encode classmethod

encode(pcl_model)

Serializes a dictionary of named field arrays into the binary layout required by a sensor_msgs/msg/PointCloud2 message. This is the inverse operation of :meth:decode.

Parameters:

Name Type Description Default
pcl_model dict[str, list]

Mapping from field name to a list of scalar values, one per point. None-valued fields should be excluded before calling (e.g., via model_dump(exclude_none=True)).

required

Returns:

Name Type Description
dict dict

A dictionary with all keys required to populate a PointCloud2 message: height, width, fields, is_bigendian, point_step, row_step, data, and is_dense.

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

translate(ros_msg, **kwargs)

Translates a ROS message into a Mosaico Message.

Returns:

Name Type Description
Message Message

The translated message containing a Radar object.

Raises:

Type Description
Exception

Wraps any translation error with context (topic name, timestamp).

from_dict classmethod

from_dict(ros_data)

Create a Radar instance from a ROS message dictionary. Example:

ros_data = {
    "height": 1,
    "width": 3,
    "fields": [...],
    "is_bigendian": False,
    "point_step": 16,
    "row_step": 48,
    "data": [...],
    "is_dense": True,
}
# Automatically resolves to a flat Mosaico Radar with attached data
mosaico_radar = RadarAdapter.from_dict(ros_data)

schema_metadata classmethod

schema_metadata(typestore, ros_msg_type, ros_version)

Extract the ROS message specific schema metadata, if any.

Parameters:

Name Type Description Default
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type str

The ROS message type to extract metadata for.

required
ros_version int

The ROS version (1 or 2) to consider for metadata extraction.

required

Returns:

Type Description
Optional[dict]

Optional[dict]: A dictionary containing the schema metadata, or None if not applicable.

ros_msg_type abstractmethod classmethod

ros_msg_type()

Returns the specific ROS message type handled by this adapter.

is_rosmsg_type_valid classmethod

is_rosmsg_type_valid(type_to_validate)

Checks whether a given ROS message type string is handled by this adapter.

Parameters:

Name Type Description Default
type_to_validate str

The full ROS message type string to check (e.g., "sensor_msgs/msg/Imu").

required

Returns:

Name Type Description
bool bool

True if the adapter supports this type, False otherwise.

unpack_mosaico_msg classmethod

unpack_mosaico_msg(mosaico_msg)

Extracts the typed Mosaico payload and its Header (if present) from a wrapped or bare message.

Handles two input cases:

  • Message wrapper: the typed data is extracted via get_data().
  • Raw ontology instance: returned as-is with

the Header is extracted from the ontology (if supported), otherwise an default Header (empty frame_id and zero Time) is returned.

Parameters:

Name Type Description Default
mosaico_msg Union[Message, T]

Either a Message envelope or a raw instance of cls.__mosaico_ontology_type__.

required

Returns:

Type Description
T

tuple[T, Header]: A (data, header) tuple where data is the typed ontology object and

Header

header is the corresponding Header, or a default Header (empty frame_id and

tuple[T, Header]

zero Time) if not present.

Raises:

Type Description
TypeError

If mosaico_msg is neither a Message nor an instance of the expected ontology type.

to_ros classmethod

to_ros(mosaico_data, typestore, ros_msg_type=None)

Converts a Mosaico PointCloudModel subtype (or a Message wrapping one) into a sensor_msgs/msg/PointCloud2 message.

Fields are serialized via :meth:encode. Only non-None model fields are included in the output point cloud.

Parameters:

Name Type Description Default
mosaico_data Union[Message, PointCloudModel]

A Message wrapping a PointCloudModel instance, or a raw PointCloudModel directly.

required
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type Optional[str]

Override for the output ROS type. Only sensor_msgs/msg/PointCloud2 is supported.

None

Returns:

Name Type Description
MsgType MsgType

A sensor_msgs/msg/PointCloud2 instance, or raises an error if:

  • the ros_msg_type is unsupported by adapter (TypeError)
  • the ros_msg_type or default type are unsupported by typestore (TypeError)
  • the ros_msg_type or default type are supported but translation is not implemented (NotImplementedError)

ontology_data_type classmethod

ontology_data_type()

Returns the Ontology class type associated with this adapter.

decode classmethod

decode(ros_data)

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: data, height, width, fields, is_bigendian, point_step.

required

Returns:

Type Description
dict[str, list]

dict[str, list]: Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if height * width == 0.

Raises:

Type Description
ValueError

If a field exposes an unsupported datatype.

encode classmethod

encode(pcl_model)

Serializes a dictionary of named field arrays into the binary layout required by a sensor_msgs/msg/PointCloud2 message. This is the inverse operation of :meth:decode.

Parameters:

Name Type Description Default
pcl_model dict[str, list]

Mapping from field name to a list of scalar values, one per point. None-valued fields should be excluded before calling (e.g., via model_dump(exclude_none=True)).

required

Returns:

Name Type Description
dict dict

A dictionary with all keys required to populate a PointCloud2 message: height, width, fields, is_bigendian, point_step, row_step, data, and is_dense.

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

translate(ros_msg, **kwargs)

Translates a ROS message into a Mosaico Message.

Returns:

Name Type Description
Message Message

The translated message containing a RGBDCamera object.

Raises:

Type Description
Exception

Wraps any translation error with context (topic name, timestamp).

from_dict classmethod

from_dict(ros_data)

Create a RGBDCamera instance from a ROS message dictionary.

Example:

ros_data = {
    "height": 1,
    "width": 3,
    "fields": [...],
    "is_bigendian": False,
    "point_step": 16,
    "row_step": 48,
    "data": [...],
    "is_dense": True,
}
# Automatically resolves to a flat Mosaico RGBDCamera with attached data
mosaico_rgbd_camera = RGBDCameraAdapter.from_dict(ros_data)

schema_metadata classmethod

schema_metadata(typestore, ros_msg_type, ros_version)

Extract the ROS message specific schema metadata, if any.

Parameters:

Name Type Description Default
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type str

The ROS message type to extract metadata for.

required
ros_version int

The ROS version (1 or 2) to consider for metadata extraction.

required

Returns:

Type Description
Optional[dict]

Optional[dict]: A dictionary containing the schema metadata, or None if not applicable.

ros_msg_type abstractmethod classmethod

ros_msg_type()

Returns the specific ROS message type handled by this adapter.

is_rosmsg_type_valid classmethod

is_rosmsg_type_valid(type_to_validate)

Checks whether a given ROS message type string is handled by this adapter.

Parameters:

Name Type Description Default
type_to_validate str

The full ROS message type string to check (e.g., "sensor_msgs/msg/Imu").

required

Returns:

Name Type Description
bool bool

True if the adapter supports this type, False otherwise.

unpack_mosaico_msg classmethod

unpack_mosaico_msg(mosaico_msg)

Extracts the typed Mosaico payload and its Header (if present) from a wrapped or bare message.

Handles two input cases:

  • Message wrapper: the typed data is extracted via get_data().
  • Raw ontology instance: returned as-is with

the Header is extracted from the ontology (if supported), otherwise an default Header (empty frame_id and zero Time) is returned.

Parameters:

Name Type Description Default
mosaico_msg Union[Message, T]

Either a Message envelope or a raw instance of cls.__mosaico_ontology_type__.

required

Returns:

Type Description
T

tuple[T, Header]: A (data, header) tuple where data is the typed ontology object and

Header

header is the corresponding Header, or a default Header (empty frame_id and

tuple[T, Header]

zero Time) if not present.

Raises:

Type Description
TypeError

If mosaico_msg is neither a Message nor an instance of the expected ontology type.

to_ros classmethod

to_ros(mosaico_data, typestore, ros_msg_type=None)

Converts a Mosaico PointCloudModel subtype (or a Message wrapping one) into a sensor_msgs/msg/PointCloud2 message.

Fields are serialized via :meth:encode. Only non-None model fields are included in the output point cloud.

Parameters:

Name Type Description Default
mosaico_data Union[Message, PointCloudModel]

A Message wrapping a PointCloudModel instance, or a raw PointCloudModel directly.

required
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type Optional[str]

Override for the output ROS type. Only sensor_msgs/msg/PointCloud2 is supported.

None

Returns:

Name Type Description
MsgType MsgType

A sensor_msgs/msg/PointCloud2 instance, or raises an error if:

  • the ros_msg_type is unsupported by adapter (TypeError)
  • the ros_msg_type or default type are unsupported by typestore (TypeError)
  • the ros_msg_type or default type are supported but translation is not implemented (NotImplementedError)

ontology_data_type classmethod

ontology_data_type()

Returns the Ontology class type associated with this adapter.

decode classmethod

decode(ros_data)

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: data, height, width, fields, is_bigendian, point_step.

required

Returns:

Type Description
dict[str, list]

dict[str, list]: Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if height * width == 0.

Raises:

Type Description
ValueError

If a field exposes an unsupported datatype.

encode classmethod

encode(pcl_model)

Serializes a dictionary of named field arrays into the binary layout required by a sensor_msgs/msg/PointCloud2 message. This is the inverse operation of :meth:decode.

Parameters:

Name Type Description Default
pcl_model dict[str, list]

Mapping from field name to a list of scalar values, one per point. None-valued fields should be excluded before calling (e.g., via model_dump(exclude_none=True)).

required

Returns:

Name Type Description
dict dict

A dictionary with all keys required to populate a PointCloud2 message: height, width, fields, is_bigendian, point_step, row_step, data, and is_dense.

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

translate(ros_msg, **kwargs)

Translates a ROS message into a Mosaico Message.

Returns:

Name Type Description
Message Message

The translated message containing a ToFCamera object.

Raises:

Type Description
Exception

Wraps any translation error with context (topic name, timestamp).

from_dict classmethod

from_dict(ros_data)

Create a ToFCamera instance from a ROS message dictionary.

Example:

ros_data = {
    "height": 1,
    "width": 3,
    "fields": [...],
    "is_bigendian": False,
    "point_step": 16,
    "row_step": 48,
    "data": [...],
    "is_dense": True,
}
# Automatically resolves to a flat Mosaico ToFCamera with attached data
mosaico_tof_camera = ToFCameraAdapter.from_dict(ros_data)

schema_metadata classmethod

schema_metadata(typestore, ros_msg_type, ros_version)

Extract the ROS message specific schema metadata, if any.

Parameters:

Name Type Description Default
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type str

The ROS message type to extract metadata for.

required
ros_version int

The ROS version (1 or 2) to consider for metadata extraction.

required

Returns:

Type Description
Optional[dict]

Optional[dict]: A dictionary containing the schema metadata, or None if not applicable.

ros_msg_type abstractmethod classmethod

ros_msg_type()

Returns the specific ROS message type handled by this adapter.

is_rosmsg_type_valid classmethod

is_rosmsg_type_valid(type_to_validate)

Checks whether a given ROS message type string is handled by this adapter.

Parameters:

Name Type Description Default
type_to_validate str

The full ROS message type string to check (e.g., "sensor_msgs/msg/Imu").

required

Returns:

Name Type Description
bool bool

True if the adapter supports this type, False otherwise.

unpack_mosaico_msg classmethod

unpack_mosaico_msg(mosaico_msg)

Extracts the typed Mosaico payload and its Header (if present) from a wrapped or bare message.

Handles two input cases:

  • Message wrapper: the typed data is extracted via get_data().
  • Raw ontology instance: returned as-is with

the Header is extracted from the ontology (if supported), otherwise an default Header (empty frame_id and zero Time) is returned.

Parameters:

Name Type Description Default
mosaico_msg Union[Message, T]

Either a Message envelope or a raw instance of cls.__mosaico_ontology_type__.

required

Returns:

Type Description
T

tuple[T, Header]: A (data, header) tuple where data is the typed ontology object and

Header

header is the corresponding Header, or a default Header (empty frame_id and

tuple[T, Header]

zero Time) if not present.

Raises:

Type Description
TypeError

If mosaico_msg is neither a Message nor an instance of the expected ontology type.

to_ros classmethod

to_ros(mosaico_data, typestore, ros_msg_type=None)

Converts a Mosaico PointCloudModel subtype (or a Message wrapping one) into a sensor_msgs/msg/PointCloud2 message.

Fields are serialized via :meth:encode. Only non-None model fields are included in the output point cloud.

Parameters:

Name Type Description Default
mosaico_data Union[Message, PointCloudModel]

A Message wrapping a PointCloudModel instance, or a raw PointCloudModel directly.

required
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type Optional[str]

Override for the output ROS type. Only sensor_msgs/msg/PointCloud2 is supported.

None

Returns:

Name Type Description
MsgType MsgType

A sensor_msgs/msg/PointCloud2 instance, or raises an error if:

  • the ros_msg_type is unsupported by adapter (TypeError)
  • the ros_msg_type or default type are unsupported by typestore (TypeError)
  • the ros_msg_type or default type are supported but translation is not implemented (NotImplementedError)

ontology_data_type classmethod

ontology_data_type()

Returns the Ontology class type associated with this adapter.

decode classmethod

decode(ros_data)

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: data, height, width, fields, is_bigendian, point_step.

required

Returns:

Type Description
dict[str, list]

dict[str, list]: Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if height * width == 0.

Raises:

Type Description
ValueError

If a field exposes an unsupported datatype.

encode classmethod

encode(pcl_model)

Serializes a dictionary of named field arrays into the binary layout required by a sensor_msgs/msg/PointCloud2 message. This is the inverse operation of :meth:decode.

Parameters:

Name Type Description Default
pcl_model dict[str, list]

Mapping from field name to a list of scalar values, one per point. None-valued fields should be excluded before calling (e.g., via model_dump(exclude_none=True)).

required

Returns:

Name Type Description
dict dict

A dictionary with all keys required to populate a PointCloud2 message: height, width, fields, is_bigendian, point_step, row_step, data, and is_dense.

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

translate(ros_msg, **kwargs)

Translates a ROS message into a Mosaico Message.

Returns:

Name Type Description
Message Message

The translated message containing a StereoCamera object.

Raises:

Type Description
Exception

Wraps any translation error with context (topic name, timestamp).

from_dict classmethod

from_dict(ros_data)

Create a StereoCamera instance from a ROS message dictionary.

Example:

ros_data = {
    "height": 1,
    "width": 3,
    "fields": [...],
    "is_bigendian": False,
    "point_step": 16,
    "row_step": 48,
    "data": [...],
    "is_dense": True,
}
# Automatically resolves to a flat Mosaico StereoCamera with attached data
mosaico_stereo_camera = StereoCameraAdapter.from_dict(ros_data)

schema_metadata classmethod

schema_metadata(typestore, ros_msg_type, ros_version)

Extract the ROS message specific schema metadata, if any.

Parameters:

Name Type Description Default
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type str

The ROS message type to extract metadata for.

required
ros_version int

The ROS version (1 or 2) to consider for metadata extraction.

required

Returns:

Type Description
Optional[dict]

Optional[dict]: A dictionary containing the schema metadata, or None if not applicable.

ros_msg_type abstractmethod classmethod

ros_msg_type()

Returns the specific ROS message type handled by this adapter.

is_rosmsg_type_valid classmethod

is_rosmsg_type_valid(type_to_validate)

Checks whether a given ROS message type string is handled by this adapter.

Parameters:

Name Type Description Default
type_to_validate str

The full ROS message type string to check (e.g., "sensor_msgs/msg/Imu").

required

Returns:

Name Type Description
bool bool

True if the adapter supports this type, False otherwise.

unpack_mosaico_msg classmethod

unpack_mosaico_msg(mosaico_msg)

Extracts the typed Mosaico payload and its Header (if present) from a wrapped or bare message.

Handles two input cases:

  • Message wrapper: the typed data is extracted via get_data().
  • Raw ontology instance: returned as-is with

the Header is extracted from the ontology (if supported), otherwise an default Header (empty frame_id and zero Time) is returned.

Parameters:

Name Type Description Default
mosaico_msg Union[Message, T]

Either a Message envelope or a raw instance of cls.__mosaico_ontology_type__.

required

Returns:

Type Description
T

tuple[T, Header]: A (data, header) tuple where data is the typed ontology object and

Header

header is the corresponding Header, or a default Header (empty frame_id and

tuple[T, Header]

zero Time) if not present.

Raises:

Type Description
TypeError

If mosaico_msg is neither a Message nor an instance of the expected ontology type.

to_ros classmethod

to_ros(mosaico_data, typestore, ros_msg_type=None)

Converts a Mosaico PointCloudModel subtype (or a Message wrapping one) into a sensor_msgs/msg/PointCloud2 message.

Fields are serialized via :meth:encode. Only non-None model fields are included in the output point cloud.

Parameters:

Name Type Description Default
mosaico_data Union[Message, PointCloudModel]

A Message wrapping a PointCloudModel instance, or a raw PointCloudModel directly.

required
typestore Typestore

The rosbags typestore for target type resolution.

required
ros_msg_type Optional[str]

Override for the output ROS type. Only sensor_msgs/msg/PointCloud2 is supported.

None

Returns:

Name Type Description
MsgType MsgType

A sensor_msgs/msg/PointCloud2 instance, or raises an error if:

  • the ros_msg_type is unsupported by adapter (TypeError)
  • the ros_msg_type or default type are unsupported by typestore (TypeError)
  • the ros_msg_type or default type are supported but translation is not implemented (NotImplementedError)

ontology_data_type classmethod

ontology_data_type()

Returns the Ontology class type associated with this adapter.

decode classmethod

decode(ros_data)

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: data, height, width, fields, is_bigendian, point_step.

required

Returns:

Type Description
dict[str, list]

dict[str, list]: Dictionary mapping each field name to a list of decoded values. Returns empty lists for all fields if height * width == 0.

Raises:

Type Description
ValueError

If a field exposes an unsupported datatype.

encode classmethod

encode(pcl_model)

Serializes a dictionary of named field arrays into the binary layout required by a sensor_msgs/msg/PointCloud2 message. This is the inverse operation of :meth:decode.

Parameters:

Name Type Description Default
pcl_model dict[str, list]

Mapping from field name to a list of scalar values, one per point. None-valued fields should be excluded before calling (e.g., via model_dump(exclude_none=True)).

required

Returns:

Name Type Description
dict dict

A dictionary with all keys required to populate a PointCloud2 message: height, width, fields, is_bigendian, point_step, row_step, data, and is_dense.