docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Message types reference

    Look up built-in ROS-compatible message types and register a custom message type.

    Simulation Pro ships with generated C# message types organized by ROS package. All types implement IMessage and are registered automatically in MessageTypeRegistry at runtime.

    Namespaces follow the pattern Unity.SimulationPro.Foundation.<Package>Messages, for example Unity.SimulationPro.Foundation.GeometryMessages.

    Geometry (geometry_msgs)

    Namespace: Unity.SimulationPro.Foundation.GeometryMessages

    Message class ROS type
    AccelMsg geometry_msgs/Accel
    AccelStampedMsg geometry_msgs/AccelStamped
    AccelWithCovarianceMsg geometry_msgs/AccelWithCovariance
    AccelWithCovarianceStampedMsg geometry_msgs/AccelWithCovarianceStamped
    InertiaMsg geometry_msgs/Inertia
    InertiaStampedMsg geometry_msgs/InertiaStamped
    PointMsg geometry_msgs/Point
    Point32Msg geometry_msgs/Point32
    PointStampedMsg geometry_msgs/PointStamped
    PolygonMsg geometry_msgs/Polygon
    PolygonStampedMsg geometry_msgs/PolygonStamped
    PoseMsg geometry_msgs/Pose
    Pose2DMsg geometry_msgs/Pose2D
    PoseArrayMsg geometry_msgs/PoseArray
    PoseStampedMsg geometry_msgs/PoseStamped
    PoseWithCovarianceMsg geometry_msgs/PoseWithCovariance
    PoseWithCovarianceStampedMsg geometry_msgs/PoseWithCovarianceStamped
    QuaternionMsg geometry_msgs/Quaternion
    QuaternionStampedMsg geometry_msgs/QuaternionStamped
    TransformMsg geometry_msgs/Transform
    TransformStampedMsg geometry_msgs/TransformStamped
    TwistMsg geometry_msgs/Twist
    TwistStampedMsg geometry_msgs/TwistStamped
    TwistWithCovarianceMsg geometry_msgs/TwistWithCovariance
    TwistWithCovarianceStampedMsg geometry_msgs/TwistWithCovarianceStamped
    Vector3Msg geometry_msgs/Vector3
    Vector3StampedMsg geometry_msgs/Vector3Stamped
    WrenchMsg geometry_msgs/Wrench
    WrenchStampedMsg geometry_msgs/WrenchStamped

    Sensor (sensor_msgs)

    Namespace: Unity.SimulationPro.Foundation.SensorMessages

    Message class ROS type
    BatteryStateMsg sensor_msgs/BatteryState
    CameraInfoMsg sensor_msgs/CameraInfo
    ChannelFloat32Msg sensor_msgs/ChannelFloat32
    CompressedImageMsg sensor_msgs/CompressedImage
    FluidPressureMsg sensor_msgs/FluidPressure
    IlluminanceMsg sensor_msgs/Illuminance
    ImageMsg sensor_msgs/Image
    ImuMsg sensor_msgs/Imu
    JointStateMsg sensor_msgs/JointState
    JoyMsg sensor_msgs/Joy
    JoyFeedbackMsg sensor_msgs/JoyFeedback
    JoyFeedbackArrayMsg sensor_msgs/JoyFeedbackArray
    LaserEchoMsg sensor_msgs/LaserEcho
    LaserScanMsg sensor_msgs/LaserScan
    MagneticFieldMsg sensor_msgs/MagneticField
    NavSatFixMsg sensor_msgs/NavSatFix
    NavSatStatusMsg sensor_msgs/NavSatStatus
    PointCloudMsg sensor_msgs/PointCloud
    PointCloud2Msg sensor_msgs/PointCloud2
    PointFieldMsg sensor_msgs/PointField
    RangeMsg sensor_msgs/Range
    RegionOfInterestMsg sensor_msgs/RegionOfInterest
    RelativeHumidityMsg sensor_msgs/RelativeHumidity
    TemperatureMsg sensor_msgs/Temperature
    TimeReferenceMsg sensor_msgs/TimeReference

    Standard (std_msgs)

    Namespace: Unity.SimulationPro.Foundation.StdMessages

    Message class ROS type
    BoolMsg std_msgs/Bool
    ByteMsg std_msgs/Byte
    ByteMultiArrayMsg std_msgs/ByteMultiArray
    CharMsg std_msgs/Char
    ColorRGBAMsg std_msgs/ColorRGBA
    DurationMsg std_msgs/Duration
    EmptyMsg std_msgs/Empty
    Float32Msg std_msgs/Float32
    Float32MultiArrayMsg std_msgs/Float32MultiArray
    Float64Msg std_msgs/Float64
    Float64MultiArrayMsg std_msgs/Float64MultiArray
    HeaderMsg std_msgs/Header
    Int8Msg std_msgs/Int8
    Int16Msg std_msgs/Int16
    Int32Msg std_msgs/Int32
    Int64Msg std_msgs/Int64
    MultiArrayDimensionMsg std_msgs/MultiArrayDimension
    MultiArrayLayoutMsg std_msgs/MultiArrayLayout
    StringMsg std_msgs/String
    TimeMsg std_msgs/Time
    UInt8Msg std_msgs/UInt8
    UInt8MultiArrayMsg std_msgs/UInt8MultiArray
    UInt16Msg std_msgs/UInt16
    UInt32Msg std_msgs/UInt32
    UInt64Msg std_msgs/UInt64

    Transform (tf2_msgs)

    Namespace: Unity.SimulationPro.Foundation.Tf2Messages

    Message class ROS type
    TFMessageMsg tf2_msgs/TFMessage
    TF2ErrorMsg tf2_msgs/TF2Error
    LookupTransformActionGoalMsg tf2_msgs/LookupTransformActionGoal
    LookupTransformActionResultMsg tf2_msgs/LookupTransformActionResult
    LookupTransformActionFeedbackMsg tf2_msgs/LookupTransformActionFeedback
    LookupTransformGoalMsg tf2_msgs/LookupTransformGoal
    LookupTransformResultMsg tf2_msgs/LookupTransformResult
    LookupTransformFeedbackMsg tf2_msgs/LookupTransformFeedback

    Navigation (nav_msgs)

    Namespace: Unity.SimulationPro.Foundation.NavMessages

    Message class ROS type
    GridCellsMsg nav_msgs/GridCells
    MapMetaDataMsg nav_msgs/MapMetaData
    OccupancyGridMsg nav_msgs/OccupancyGrid
    OdometryMsg nav_msgs/Odometry
    PathMsg nav_msgs/Path

    Diagnostic (diagnostic_msgs)

    Namespace: Unity.SimulationPro.Foundation.DiagnosticMessages

    Message class ROS type
    DiagnosticArrayMsg diagnostic_msgs/DiagnosticArray
    DiagnosticStatusMsg diagnostic_msgs/DiagnosticStatus
    KeyValueMsg diagnostic_msgs/KeyValue

    Visualization (visualization_msgs)

    Namespace: Unity.SimulationPro.Foundation.VisualizationMessages

    Message class ROS type
    MarkerMsg visualization_msgs/Marker
    MarkerArrayMsg visualization_msgs/MarkerArray
    InteractiveMarkerMsg visualization_msgs/InteractiveMarker
    InteractiveMarkerControlMsg visualization_msgs/InteractiveMarkerControl
    InteractiveMarkerFeedbackMsg visualization_msgs/InteractiveMarkerFeedback
    InteractiveMarkerInitMsg visualization_msgs/InteractiveMarkerInit
    InteractiveMarkerPoseMsg visualization_msgs/InteractiveMarkerPose
    InteractiveMarkerUpdateMsg visualization_msgs/InteractiveMarkerUpdate
    MenuEntryMsg visualization_msgs/MenuEntry
    MeshTriangleMsg visualization_msgs/MeshTriangle
    UVCoordinateMsg visualization_msgs/UVCoordinate

    Other packages

    Additional message sets are included for:

    Namespace suffix ROS package
    ActionlibMessages actionlib_msgs
    MapMessages map_msgs
    MoveBaseMessages move_base_msgs
    ObjectRecognitionMessages object_recognition_msgs
    OctomapMessages octomap_msgs
    RosgraphMessages rosgraph_msgs
    ShapeMessages shape_msgs
    TrajectoryMessages trajectory_msgs

    Construct messages

    Messages follow the naming convention {Name}Msg. Most have constructors that accept field values in ROS field order:

    using Unity.SimulationPro.Foundation.StdMessages;
    using Unity.SimulationPro.Foundation.GeometryMessages;
    
    var header = new HeaderMsg(seq: 0, stamp: ClockHelpers.ConstructTimeMsg(Clock.Now), frameId: "base_link");
    var point  = new PointMsg(x: 1.0, y: 2.0, z: 3.0);
    var pose   = new PoseMsg(position: point, orientation: new QuaternionMsg(0, 0, 0, 1));
    

    MessageTypeId

    Every message has a MessageTypeId property combining the ROS type string and an optional MessageDisambiguator:

    MessageTypeId id = new PoseMsg().MessageTypeId;
    Debug.Log(id.MessageTypeName); // "geometry_msgs/Pose"
    

    Register a custom message type

    Generate custom messages using the message code-generation tooling in Editor/Foundation/MessageGeneration/. Custom message classes must implement IMessage and call MessageTypeRegistry.RegisterMessageType<T>() at startup (or use the [RegisterMessageType] attribute if available).

    Additional resources

    • Introduction to messaging
    • Set up publishers and subscribers workflow
    • Connect to a live ROS environment
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)