docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ImageMarkerMsg

    ROS visualization_msgs/ImageMarker message.

    Inheritance
    object
    ImageMarkerMsg
    Implements
    IMessage
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.SimulationPro.Foundation.Visualization
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    [Serializable]
    public class ImageMarkerMsg : IMessage

    Constructors

    ImageMarkerMsg()

    Initializes a new instance with default values.

    Declaration
    public ImageMarkerMsg()

    ImageMarkerMsg(HeaderMsg, string, int, int, int, PointMsg, float, ColorRGBAMsg, byte, ColorRGBAMsg, DurationMsg, PointMsg[], ColorRGBAMsg[])

    Initializes a new instance with default values.

    Declaration
    public ImageMarkerMsg(HeaderMsg header, string ns, int id, int type, int action, PointMsg position, float scale, ColorRGBAMsg outline_color, byte filled, ColorRGBAMsg fill_color, DurationMsg lifetime, PointMsg[] points, ColorRGBAMsg[] outline_colors)
    Parameters
    Type Name Description
    HeaderMsg header

    ROS message header containing timestamp and coordinate frame identifier.

    string ns

    ROS namespace for scoping this element.

    int id

    Unique integer identifier.

    int type

    Integer type code specifying the variant or category.

    int action

    The action message payload.

    PointMsg position

    Position in 3D space.

    float scale

    Scale factor along each axis.

    ColorRGBAMsg outline_color

    Color used for the outline.

    byte filled

    Whether to render filled regions.

    ColorRGBAMsg fill_color

    Color used for filled regions.

    DurationMsg lifetime

    Duration this marker remains visible; zero means permanent.

    PointMsg[] points

    Array of 3D points.

    ColorRGBAMsg[] outline_colors

    Array of colors used for outlines.

    Fields

    ADD

    Constant value for ADD.

    Declaration
    public const int ADD = 0
    Field Value
    Type Description
    int

    CIRCLE

    Constant value for CIRCLE.

    Declaration
    public const int CIRCLE = 0
    Field Value
    Type Description
    int

    LINE_LIST

    Constant value for LINE_LIST.

    Declaration
    public const int LINE_LIST = 2
    Field Value
    Type Description
    int

    LINE_STRIP

    Constant value for LINE_STRIP.

    Declaration
    public const int LINE_STRIP = 1
    Field Value
    Type Description
    int

    POINTS

    Constant value for POINTS.

    Declaration
    public const int POINTS = 4
    Field Value
    Type Description
    int

    POLYGON

    Constant value for POLYGON.

    Declaration
    public const int POLYGON = 3
    Field Value
    Type Description
    int

    REMOVE

    Constant value for REMOVE.

    Declaration
    public const int REMOVE = 1
    Field Value
    Type Description
    int

    action

    Either ADD or REMOVE.

    Declaration
    public int action
    Field Value
    Type Description
    int

    fill_color

    Fill color; in the range: [0.0-1.0]

    Declaration
    public ColorRGBAMsg fill_color
    Field Value
    Type Description
    ColorRGBAMsg

    filled

    Whether or not to fill in the shape with color.

    Declaration
    public byte filled
    Field Value
    Type Description
    byte

    header

    Header field.

    Declaration
    public HeaderMsg header
    Field Value
    Type Description
    HeaderMsg

    id

    Unique id within the namespace.

    Declaration
    public int id
    Field Value
    Type Description
    int

    k_MessageTypeId

    Identifier for this message type.

    Declaration
    public static readonly MessageTypeId k_MessageTypeId
    Field Value
    Type Description
    MessageTypeId

    k_MessageTypeName

    The ROS message type name string used for serialization and topic matching.

    Declaration
    public const string k_MessageTypeName = "visualization_msgs/ImageMarker"
    Field Value
    Type Description
    string

    lifetime

    How long the object should last before being automatically deleted. 0 indicates forever.

    Declaration
    public DurationMsg lifetime
    Field Value
    Type Description
    DurationMsg

    ns

    Namespace which is used with the id to form a unique id.

    Declaration
    public string ns
    Field Value
    Type Description
    string

    outline_color

    The outline color of the marker.

    Declaration
    public ColorRGBAMsg outline_color
    Field Value
    Type Description
    ColorRGBAMsg

    outline_colors

    The color for each line, point, etc. in the points field.

    Declaration
    public ColorRGBAMsg[] outline_colors
    Field Value
    Type Description
    ColorRGBAMsg[]

    points

    Coordinates in 2D in pixel coords. Used for LINE_STRIP, LINE_LIST, POINTS, etc.

    Declaration
    public PointMsg[] points
    Field Value
    Type Description
    PointMsg[]

    position

    Two-dimensional coordinate position, in pixel-coordinates.

    Declaration
    public PointMsg position
    Field Value
    Type Description
    PointMsg

    scale

    The scale of the object, e.g. the diameter for a CIRCLE.

    Declaration
    public float scale
    Field Value
    Type Description
    float

    type

    One of the above types, e.g. CIRCLE, LINE_STRIP, etc.

    Declaration
    public int type
    Field Value
    Type Description
    int

    Properties

    MessageTypeId

    Gets the unique runtime identifier for this message type.

    Declaration
    public MessageTypeId MessageTypeId { get; }
    Property Value
    Type Description
    MessageTypeId

    MessageTypeName

    Gets the ROS message type name for this message.

    Declaration
    public string MessageTypeName { get; }
    Property Value
    Type Description
    string

    Methods

    Deserialize(IMessageDeserializer)

    Deserializes a ImageMarkerMsg from the given deserializer.

    Declaration
    public static ImageMarkerMsg Deserialize(IMessageDeserializer deserializer)
    Parameters
    Type Name Description
    IMessageDeserializer deserializer

    The deserializer.

    Returns
    Type Description
    ImageMarkerMsg

    A new ImageMarkerMsg instance.

    Register()

    Registers this message type with the MessageTypeRegistry.

    Declaration
    [InitializeOnLoadMethod]
    public static void Register()

    ToString()

    Returns a human-readable string representation of this message.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of this instance.

    Overrides
    object.ToString()

    WriteTo(IMessageSerializer)

    Serializes this message to the given serializer.

    Declaration
    public void WriteTo(IMessageSerializer serializer)
    Parameters
    Type Name Description
    IMessageSerializer serializer

    The serializer.

    Implements

    IMessage
    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)