0
$\begingroup$

Rosanswers logo

I noticed that the timestamps associated with my topics is not updating smoothly. It will go for several messages without changing (or changing by some very small amount), then change a lot all of a sudden. This is very obvious when looking at rqt_plot because you end up getting a bunch of points right on top of one another, then a large jump along the x axis, then a bunch more points on top of each other. The problem is also present in bag files.

I did notice that I can cut down on the number of messages I am publishing and at some point the problem goes away. Really not sure what is going on here. Any help is appreciated.

Update

To clarify, the timestamps I'm referring to are not timestamps within my ros topics, they are the timestamps automatically generated by ros for all topics that are published.

Here is an example of what I am talking about with rqt_plot image description

I'm publishing the following topics at 1000Hz (although I see the problem even if I publish them as slow as 50Hz). The topics I'm publishing have the following structure:

/pose

pose_msg.msg
    node_pose_msg[10]   nodes

        node_pose_msg.msg
            float64 m
            float64 nx_acc
            float64 ny_acc
            float64 nx_gyr
            float64 ny_gyr
            float64 nx_filt
            float64 ny_filt
            float64 acc
            float64 gyr

I'm publishing about 5 topics of this general size and structure. Is this just too much data for the ros messaging infrastructure to keep up with? It certainly doesn't seem like it should be.


Originally posted by gabehein on ROS Answers with karma: 1 on 2015-04-15

Post score: 0


Original comments

Comment by Procópio on 2015-04-16:
are using Stage? because it has a simulation time step that might result in the behavior you are describing.

Comment by gabehein on 2015-04-16:
No, nothing like that. Just publishing a bunch of sensor and state data.

Comment by Procópio on 2015-04-17:
can add your rqt_plot output here, to help us find a solution? besides that, how are you stamping your messages? did you write the sensors drivers yourself?

Comment by gabehein on 2015-04-17:
Thanks for the response. I updated my post to address your questions.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think your message is missing a header, which you should fill, normally using ros::Time::now() . Also, looking at your figure, what are we looking at (what the axes mean)? Assuming the X is the time, there is no discontinuity, so I'd assume the timestamps are fine. It looks like the messages just stuck with some constant value during some instants. Try doing a tf echo /your_msg, maybe it will help you find what is going on.


Originally posted by Procópio with karma: 4402 on 2015-04-21

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.