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
SceneBroadcaster: Use double for state publish frequency instead of int #1417
SceneBroadcaster: Use double for state publish frequency instead of int #1417
Conversation
…ency instead of int Signed-off-by: Theodoros Tyrovouzis <teotyrov@gmail.com>
Signed-off-by: Theodoros Tyrovouzis <teotyrov@gmail.com>
3f9259a
to
43d7494
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, the fix works for me!
Would you be able to add a test to test/integration/scene_broadcaster_system.cc
? It will be tricky to check for precise publish times since the plugin uses the system clock, so I think the test could at least check that there's no crash.
I am a little new to this, is there an example for a test for crashing? |
Signed-off-by: Theodoros Tyrovouzis <teotyrov@gmail.com>
I think I can make death tests to check for crashes, is it ok? I am asking because I have not seen it in any other one of gazebo's test suites. |
Oh I don't think we need to go that far. Just exercising that code path and having the test run successfully should be enough to make sure there's no crash. This way, if someone reverts the changes from this PR in the future, the test will crash and we'll notice the regression. Thanks! |
Signed-off-by: Theodoros Tyrovouzis <teotyrov@gmail.com>
I added a test with a simple SDF string. It passes with the current fix but if ran before the patch it crashes with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for iterating!
…
🦟 Bug fix
Fixes #1414
Summary
Changed the
state_hertz
publishing frequency data type fromint
todouble
. Previously, worlds with those params set between 0 and 1 would crash due to being rounded to 0 andstate_hertz
being inverted. Note that dynamic_pose_hertz still gets rounded down to 0 as it is represented asint
inAdvertiseOptions
, but does not cause a crash.Checklist
codecheck
passed (See contributing)