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

fix: OctoMap and Filtered_Cloud Not Updating During Movement Execution #3209

Merged

Conversation

MarcoMagriDev
Copy link
Contributor

Description

MutuallyExclusive callbackgroup has been added to point_cloud_subscriber_ to allow updating octomap during robot motion. See #2192


Additional notes

  • I was not able to do the same fix to the depth_image_octomap_updater since image_transport::create_camera_subscription seems to not allow passing SubscriptionOptions.

  • I noticed that there is a big computational time mismatch between the two approaches (depth/pointcloud). After digging in a bit i found that the main computational time difference comes from lazy_free_space_updater but unfortunately I have not time to fix it. I will use the pointcloud instead._

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 45.61%. Comparing base (75286c7) to head (ce08669).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...octomap_updater/src/pointcloud_octomap_updater.cpp 0.00% 6 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3209      +/-   ##
==========================================
- Coverage   46.01%   45.61%   -0.40%     
==========================================
  Files         714      714              
  Lines       62304    62288      -16     
  Branches     7532     7529       -3     
==========================================
- Hits        28666    28408     -258     
- Misses      33471    33713     +242     
  Partials      167      167              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

Thanks! To clarify, the fix is simply using a new callback group to process these subscriber callbacks separately from everything else, but the type of callback is less relevant in this case?

Anyways, just one very small comment for readability.

@sea-bass
Copy link
Contributor

sea-bass commented Jan 8, 2025

Also seems you are right about the image_transport CameraSubscriber not having an input for rclcpp::SubscriberOptions.

I looked at https://github.com/ros-perception/image_common and it wouldn't be too hard to add by just copying how it's done for the Subscriber... but it is extra work.

@MarcoMagriDev MarcoMagriDev force-pushed the fix-octomap-not-updating-during-motion branch from d6f6c38 to ce08669 Compare January 8, 2025 13:10
Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

Great, thank you!

I'm gonna request one more review on this one just in case.

@sea-bass sea-bass added backport-humble Mergify label that triggers a PR backport to Humble backport-jazzy Mergify label that triggers a PR backport to Jazzy labels Jan 8, 2025
Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

Thank you! Do you think we should be switching to another API for depth image processing?

@sjahr
Copy link
Contributor

sjahr commented Jan 9, 2025

Thanks! Do you mind opening and issue for

I noticed that there is a big computational time mismatch between the two approaches (depth/pointcloud). After digging in a bit i found that the main computational time difference comes from lazy_free_space_updater but unfortunately I have not time to fix it. I will use the pointcloud instead._

@sjahr sjahr added this pull request to the merge queue Jan 9, 2025
Merged via the queue into moveit:main with commit 246aa58 Jan 9, 2025
9 checks passed
mergify bot pushed a commit that referenced this pull request Jan 9, 2025
#3209)

* fix: adds MutuallyExclusive to pointcloud subscriber to allow octomap updates during motion

* refactor: adjust macro for readability

(cherry picked from commit 246aa58)

# Conflicts:
#	moveit_ros/perception/pointcloud_octomap_updater/include/moveit/pointcloud_octomap_updater/pointcloud_octomap_updater.hpp
#	moveit_ros/perception/pointcloud_octomap_updater/src/pointcloud_octomap_updater.cpp
mergify bot pushed a commit that referenced this pull request Jan 9, 2025
#3209)

* fix: adds MutuallyExclusive to pointcloud subscriber to allow octomap updates during motion

* refactor: adjust macro for readability

(cherry picked from commit 246aa58)
@MarcoMagriDev
Copy link
Contributor Author

Ofc @sjahr , I just open a new issue here #3216

sea-bass pushed a commit that referenced this pull request Jan 10, 2025
sea-bass pushed a commit that referenced this pull request Jan 12, 2025
…n (backport #3209) (#3211)

(cherry picked from commit 246aa58)

Co-authored-by: Marco Magri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble Mergify label that triggers a PR backport to Humble backport-jazzy Mergify label that triggers a PR backport to Jazzy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants