Skip to main content

Module ros2

Module ros2 

Source
Expand description

The C ABI for the ROS 2 naming and encoding rules.

These wrap [pamoja_ros2] for callers that reach the SDK through the flat C boundary: what makes a topic name legal, what it becomes on the DDS wire, the RIHS type hash that identifies a message definition, and the CDR encoding the payload itself is written in.

None of it needs a ROS 2 installation, which is the point. A gateway can validate a name, derive the DDS topic and the Zenoh key an rmw_zenoh peer subscribes on, and encode a geometry_msgs/msg/Twist without linking against anything from a ROS distribution. Driving a live graph does need one, so the bridge feature stays Rust-only.

Structs§

PamojaCdrReader
An opaque handle to a CDR decoder.
PamojaCdrWriter
An opaque handle to a CDR encoder.
PamojaRos2Twist
A body velocity command, matching geometry_msgs/msg/Twist.
PamojaTypeHash
A RIHS01 type hash: the 32-byte digest that identifies a message definition.
PamojaVector3
A three-dimensional vector, matching geometry_msgs/msg/Vector3.

Enums§

PamojaEntityKind
The ROS 2 subsystem a name belongs to, which fixes its DDS prefix.

Constants§

PAMOJA_TYPE_HASH_LEN
The number of bytes in a RIHS01 type hash digest.

Functions§

pamoja_cdr_reader_free
Releases a CDR decoder handle.
pamoja_cdr_reader_new
Creates a CDR decoder over encoded bytes.
pamoja_cdr_reader_read_f32
Reads the next 32-bit float.
pamoja_cdr_reader_read_f64
Reads the next 64-bit float.
pamoja_cdr_reader_read_i32
Reads the next 32-bit signed integer.
pamoja_cdr_reader_read_u32
Reads the next 32-bit unsigned integer.
pamoja_cdr_writer_free
Releases a CDR encoder handle.
pamoja_cdr_writer_into_bytes
Takes the encoded bytes, consuming the encoder.
pamoja_cdr_writer_new
Creates a CDR encoder with the encapsulation header already written.
pamoja_cdr_writer_write_f32
Appends a 32-bit float.
pamoja_cdr_writer_write_f64
Appends a 64-bit float.
pamoja_cdr_writer_write_i32
Appends a 32-bit signed integer.
pamoja_cdr_writer_write_u32
Appends a 32-bit unsigned integer.
pamoja_ros2_dds_topic
Returns the DDS topic a fully qualified ROS 2 name maps onto.
pamoja_ros2_dds_type_name
Returns the DDS type name a ROS 2 interface type maps onto.
pamoja_ros2_entity_key
Builds the Zenoh key an rmw_zenoh peer publishes an entity on.
pamoja_ros2_entity_kind_prefix
Returns the DDS topic prefix a subsystem uses.
pamoja_ros2_name_is_fully_qualified
Reports whether a name is fully qualified, so it resolves with no namespace.
pamoja_ros2_name_is_valid
Reports whether a string is a valid ROS 2 topic or service name.
pamoja_ros2_percent_mangle
Percent-mangles a name the way a DDS partition requires.
pamoja_ros2_twist_from_cdr
Decodes a twist from its CDR representation.
pamoja_ros2_twist_to_cdr
Encodes a twist into its CDR representation.
pamoja_ros2_type_hash_parse
Parses a RIHS01 type hash string.
pamoja_ros2_type_hash_to_string
Renders a type hash back to its RIHS01 string.