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

timestamps for ros topics not updating smoothly

asked 2015-04-15 16:27:31 -0500

gabehein gravatar image

updated 2015-04-21 08:59:49 -0500

Procópio gravatar image

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.

edit retag flag offensive close merge delete

Comments

are using Stage? because it has a simulation time step that might result in the behavior you are describing.

Procópio gravatar image Procópio  ( 2015-04-16 06:31:20 -0500 )edit

No, nothing like that. Just publishing a bunch of sensor and state data.

gabehein gravatar image gabehein  ( 2015-04-16 19:17:23 -0500 )edit

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?

Procópio gravatar image Procópio  ( 2015-04-17 02:17:27 -0500 )edit

Thanks for the response. I updated my post to address your questions.

gabehein gravatar image gabehein  ( 2015-04-17 11:23:53 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-04-21 09:02:46 -0500

Procópio gravatar image

updated 2015-04-21 09:06:20 -0500

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-04-15 16:27:31 -0500

Seen: 778 times

Last updated: Apr 21 '15