ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Unitended change of message content

asked 2019-10-29 15:48:54 -0600

premQlt gravatar image

updated 2019-10-29 22:18:19 -0600

gvdhoorn gravatar image

Hi there,

I am running ROS Melodic on an Ubuntu 16.04 64-bit machine. While processing odometry messages from a rosbag file in a single node, I could not receive the expected output.

While debugging my code I published the incoming odometry messages to a separate topic and used PlotJuggler to compare them to the messages on the original topic. The plot shows that incoming and outgoing values are not equal. Due to missing karma points I cannot upload a screenshot. The code to reproduce is below. What am I missing here?

Thanks in advance!

class OdomCollector
    this->node = new ros::NodeHandle();
    this->publisher = this->node->advertise<nav_msgs::Odometry>("odom_buffered", 10, true);
    this->subscriber = this->node->subscribe("odom", 50, &OdomCollector::storeCallback, this);

  // data members
  std::vector<nav_msgs::Odometry::Ptr> inMsgs;

  // object members
  ros::NodeHandle *node;
  ros::Publisher publisher;
  ros::Subscriber subscriber;

  // member functions()
  void storeCallback(const nav_msgs::OdometryPtr &inMsg)

  void publish()
    // stumb

int main(int argc, char **argv)
  ros::init(argc, argv, "Odom_Collector");
  OdomCollector collector;

  // loop
  ROS_INFO("Odom_Collector Node up and running");

  return 0;

Edit: Here a screenshot from PlotJuggler, showing how the points in the topic odom_buffered give roughly the same course for the graph, but not resemble the original points. I wrote the same node in python with the same result. If a copy of rostopic echo provides any additional info, I can provide that as well.


edit retag flag offensive close merge delete



Showing code is not going to be sufficient here. Please show at least a few messages from rostopic echo, clearly indicating the differences between what you expect and what you see.

I've also given you sufficient karma to attach a screenshot, but please note that screenshots of terminals and code are not needed nor desirable: you can just copy-paste the text into your question.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-29 22:05:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-30 15:44:39 -0600

premQlt gravatar image

I saved the output of rostopic echo /odom/pose/pose/position/x > odom_x.csv to csv and compared the values in a spreadsheet. Values were identical, so I guess I found a weird bug in PlotJugglers Ros_Topic_Streamer. Did anybody experience a similar behavior?

edit flag offensive delete link more


Is this answer or an update to your question?

jayess gravatar image jayess  ( 2019-10-30 18:26:23 -0600 )edit

I guess a little bit of both. But the problem is solved in so far, that the values are not off. So the thread can be closed. Thank you!

premQlt gravatar image premQlt  ( 2019-10-30 22:05:48 -0600 )edit

Hi, I am the author of Plotjuggler. If you ever think that it might have an issue or bug, please report it on Github. Thanks!

Davide Faconti gravatar image Davide Faconti  ( 2019-11-29 02:58:39 -0600 )edit

Question Tools



Asked: 2019-10-29 15:48:54 -0600

Seen: 158 times

Last updated: Oct 30 '19