-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some fixes for the --repeat_latched option #2201
base: noetic-devel
Are you sure you want to change the base?
Conversation
Nice catch, thx a lot! ros_comm/tools/rosbag/src/recorder.cpp Line 100 in 785826e
|
Hi, |
Can this be merged please? It contains essential fixes. |
Hi @mjcarroll what do you think about this? |
Yes please, I have no issues with that part. I'll need a moment to think about the other part. |
I created #2314 that will only fix the undefined variable. |
561c349
to
af15538
Compare
This PR has now been updated to only include the |
This should fix some problems with #1850 :
1
The
repeat_latched
member variable bool was left in an uninitialized/random state.On my machine, even without specifying "--repeat_latched", it was sometimes activated.
2
When repeating the latched messages in splitted bags, these should still be published as latched.
Steps to reproduce :
Start the following in several terminals :
roscore
rostopic pub -l /chatter_latched std_msgs/String "data: 'blabla'"
rostopic pub -r 2 /periodic std_msgs/Empty
rosrun rosbag record -a --repeat-latched --duration 5 --split
after ~15 seconds stop all the nodes and the
rosbag record
without the fix : when playing a splitted bag
rosrun rosbag play [...]_1.bag -s 2
: runningrostopic echo /chatter_latched
will show nothingwith this fix : when playing a splitted bag
rosrun rosbag play [...]_1.bag -s 2
: runningrostopic echo /chatter_latched
will show the message, because it is latched