Closed sloretz closed 1 year ago
I've updated the PR to include the following changes:
initialized_
flag that prevents an async class from getting initialized twice (with the appropriate tests)take_data()
We uncovered a potential bug in rclcpp's executors' handling of mutually exclusive callback groups, but in this case it doesn't block the progress for fuse_core
I made a few changes after self-reviewing and reading this bit of fuse_tutorials.
onStart
and onStop
and nothing else. I updated this PR to make sure the ROS 2 port behaves the same (meaning I removed the bits where we cleared the callback queue when the Context
was still valid)stop()
that was fixed by #182. When ROS is shutdown the AsyncSpinner
won't call anymore callbacks, so the onStop
method won't get called. That's why there's a special case where onStop
is called directly, and it also opportunistically took the opportunity to clean up the AsyncSpinner
(though IIUC it doesn't have to do that). The ROS 2 executor has the same behavior of no longer servicing callbacks when the Context
shuts down, so I made the logic the same as it was before.initialize
and destruction by making initialize()
block until the spinner thread starts. This made internal_stop()
simpler.@ros-pull-request-builder retest this please
@ros-pull-request-builder retest this please
Let's add an initialized_ = false in the internal stops
Added in 9c95cf6
@ros-pull-request-builder retest this please
@methylDragon Here's an alternative to #293. I'm running the
test_async_sensor_model
test locally with--retest-until-fail 1000
. I think this addresses the two issues found so far.@svwilliams for visibility