Skip to content
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

Midigate spamming for 50Hz lidar #526

Merged
merged 2 commits into from
Aug 24, 2022

Conversation

samiamlabs
Copy link
Contributor

Basic Info

I'm trying to use Slam Toolbox on a Clearpath Husky with lms111 lidars that default to 50Hz.

Currently, I get a massive amount of info messages about dropped messages in the terminal

[sync_slam_toolbox_node-15] [INFO] [1661266264.459040162] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.393 for reason 'discarding message because the queue is full'
[sync_slam_toolbox_node-15] [INFO] [1661266264.499800792] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.433 for reason 'discarding message because the queue is full'
[sync_slam_toolbox_node-15] [INFO] [1661266264.519281786] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.453 for reason 'discarding message because the queue is full'
[sync_slam_toolbox_node-15] [INFO] [1661266264.539066862] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.473 for reason 'discarding message because the queue is full'
[sync_slam_toolbox_node-15] [INFO] [1661266264.559734918] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.493 for reason 'discarding message because the queue is full'
[sync_slam_toolbox_node-15] [INFO] [1661266264.598413246] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.534 for reason 'discarding message because the queue is full'
[sync_slam_toolbox_node-15] [INFO] [1661266264.618225423] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.553 for reason 'discarding message because the queue is full'
[sync_slam_toolbox_node-15] [INFO] [1661266264.638513284] [slam_toolbox]: Message Filter dropping message: frame 'base_link' at time 5.573 for reason 'discarding message because the queue is full'

Increasing the queue_size a bit seems to mitigate most of the problem, but maybe there is a better solution.

| ------ | ----------- |
| Primary OS tested on | Ubuntu |
| Robotic platform tested on | gazebo simulation, Clearpath Husky |


Description of contribution in a few bullet points

  • Increased queue_size for scan_filter

@SteveMacenski
Copy link
Owner

We can't blanket make this change unless the choice of 5 is generally principled. Plus, in async mode, we really just want the most recent scan to keeping the buffer would be problematic. It might be sensible to make this a parameter.

Also, this PR should target ros2 so that all new distributions have it. Once its merged here, I can backport to Humble.

@samiamlabs samiamlabs changed the base branch from humble to ros2 August 24, 2022 15:37
@samiamlabs
Copy link
Contributor Author

samiamlabs commented Aug 24, 2022

Alright!

I added the queue size as a parameter for now (in case we want to go in that direction) and targeted the PR to ros2.

Was thinking about maybe just finding a way to suppress the info log instead of trying to prevent it from dropping messages. The actual mapping seems to be working despite all the logs.

The logs being INFO rather than DEBUG kind of indicates that you are not supposed to use it that way though...

Copy link
Owner

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@SteveMacenski SteveMacenski merged commit cede9e8 into SteveMacenski:ros2 Aug 24, 2022
@SteveMacenski
Copy link
Owner

I'm planning on doing some syncs across a bunch of repos on Friday, so I'll get these changes out to Humble around then

SteveMacenski pushed a commit that referenced this pull request Aug 24, 2022
* Increase scan filter queue_size

* Add scan_queue_size as parameter
SteveMacenski added a commit that referenced this pull request Aug 24, 2022
* Publish pose with covariance in localization mode. (#511)

* Visualize localization nodes and edges with different colors in the pose graph marker message. (#513)

* Fix edge marker id to not conflict with the localization edge marker. (#515)

* Stop ceres problem from freeing loss function (#519)

* Add map_and_localization node that supports toggling between mapping and localization modes with a service. (#512)

* resolve API change from galactic (#524)

* Fix segfault after loading posegraph (#527)

* Assign mapper to closure_assistant after loading posgraph

* Fix linting

* Midigate spamming for 50Hz lidar (#526)

* Increase scan filter queue_size

* Add scan_queue_size as parameter

Co-authored-by: Marc Alban <[email protected]>
Co-authored-by: john-maidbot <[email protected]>
Co-authored-by: Samuel Lindgren <[email protected]>
@malban
Copy link
Contributor

malban commented Sep 1, 2022

I have a related PR open for the tf message filter: ros2/geometry2#544, which seems to struggle with high rate messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants