Skip to main content
Cerulion ships ROS2-compatible message types in the native_ros2_messages crate, generated from ROS2 Jazzy .msg files at build time. There are 20 packages. Import a type from its package:
use native_ros2_messages::sensor_msgs::Image;

Packages and representative types

The following table lists the packages with representative types from each. Type names are the PascalCase form of the source .msg file.
PackageRepresentative types
action_msgsAction-related message types.
builtin_interfacesTime, Duration.
control_msgsJointTrajectoryControllerState, DynamicJointState, JointJog, PidState, GripperCommand.
diagnostic_msgsDiagnostic message types.
geometry_msgsPoint, Point32, Pose, Pose2D, PoseArray, Quaternion, Transform, Twist, Vector3, Accel, Inertia, Polygon.
grid_map_msgsGridMap, GridMapInfo.
moveit_msgsCollisionObject, AttachedCollisionObject, DisplayTrajectory, Constraints, Grasp.
nav_msgsOdometry, Path, OccupancyGrid, MapMetaData, GridCells.
object_recognition_msgsRecognizedObject, RecognizedObjectArray, ObjectInformation.
octomap_msgsOctomap, OctomapWithPose.
radar_msgsRadarReturn, RadarScan, RadarTrack, RadarTracks.
sensor_msgsImage, Imu, LaserScan, JointState, PointCloud2, CameraInfo, CompressedImage, NavSatFix, BatteryState, Range.
shape_msgsShape primitive types.
statistics_msgsStatistics message types.
std_msgsHeader, String, Bool, Byte, Char, ColorRGBA, Empty, Float32/64, Int8/16/32/64, UInt8/16/32/64, and the *MultiArray family.
tf2_msgsTransform-tree message types.
trajectory_msgsTrajectory types.
unique_identifier_msgsUUID.
vision_msgsDetection2D, Detection2DArray, Detection3D, Detection3DArray, BoundingBox2D, BoundingBox3D, Classification, ObjectHypothesis, ObjectHypothesisWithPose, VisionInfo.
visualization_msgsMarker, MarkerArray.

ROS2-to-Rust type mapping

schema info displays Rust types using this mapping:
ROS2 typeRust type
boolbool
byte / uint8u8
char / int8i8
uint16u16
int16i16
uint32u32
int32i32
uint64u64
int64i64
float32f32
float64f64
stringString
T[]Vec<T>

Fixed vs variable fields

Fixed-size primitive fields are written directly — the write goes straight to shared memory, for example self.image.height = 480. Variable-length fields (string, T[]) must be listed in the #[output(...)] attribute; once listed, plain assignment works for them too. See the Node macro reference for the #[output(...)] keys.
use native_ros2_messages::sensor_msgs::Image;
// in tick (with #[output(data, encoding)] image: Image):
self.image.height = 480;            // fixed field, direct write
self.image.width  = 640;
self.image.encoding = "rgb8";       // variable field — plain assignment, listed in #[output]
In your node struct, a message type is used by name as a port field — for example image: Image — and read or written through plain field access inside tick().