Home | Tutorials | Wiki | Issues
Ask Your Question
0

How do I plot my messages

asked 2018-10-30 22:24:40 -0500

MartinDeegan gravatar image

I am publishing a LaserScanmessage over ignition transport and I want to plot it in the utility shown here: https://www.youtube.com/watch?v=G5qBa...

I don't see the topic anywhere in the topic visualizer or the plotting utility. How can I add my messages to both?

My code:

    std::string IGNITION_TOPIC = "LIDAR";
    ignition::transport::Node node;
    ignition::transport::Node::Publisher pub = node.Advertise<ignition::msgs::LaserScan>(IGNITION_TOPIC);

    scan.Clear();
    auto* time_ptr = scan.mutable_header()->mutable_stamp();
    scan.add_ranges(distance);
    time_ptr->set_sec(time.sec);
    time_ptr->set_nsec(time.nsec);

    pub.Publish(scan);
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-10-31 12:19:02 -0500

The topic viewer and the plotting only support Gazebo Transport for now, that's why your Ignition Transport topic is not coming up.

So you can either switch to use Gazebo Transport, or you can use Ignition GUI, which has a plot widget for Ignition Transport.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-30 22:24:40 -0500

Seen: 47 times

Last updated: Oct 31 '18