Skip to content

Unity hangs when Markers are serialized with missing fields #10

@GregoryLeMasurier

Description

@GregoryLeMasurier

Unity hangs after calling msg.Serialize() on a Marker with missing fields: marker.header.stamp and marker.lifetime.

Source used:

    public ROSCore rosmaster;
    private NodeHandle nh = null;

    private Publisher<MarkerArray> pub;

	// Use this for initialization
    void Start () {
        nh = rosmaster.getNodeHandle();
        pub = nh.advertise<MarkerArray>("test", 10);
    }

    void Update()
    {
        MarkerArray msg = new MarkerArray();
        msg.markers = new Marker[1];

        msg.markers[0] = new Marker();
        msg.markers[0].header = new Messages.std_msgs.Header();
        msg.markers[0].header.stamp = ROS.GetTime();
        

        msg.markers[0].lifetime = new Duration();

        msg.Serialize();

        pub.publish(msg);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions