Skip to content

Unity hangs when Markers are serialized with missing fields #10

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);
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions