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

Inflated self robot link removal from Octree #3285

Open
Ayush1285 opened this issue Jan 30, 2025 · 7 comments
Open

Inflated self robot link removal from Octree #3285

Ayush1285 opened this issue Jan 30, 2025 · 7 comments
Labels
enhancement New feature or request

Comments

@Ayush1285
Copy link

Ayush1285 commented Jan 30, 2025

Is your feature request related to a problem? Please describe.

I'm using PoinCloudOctomapUpdater plugin for building Octomap of the environment for collision checking. Problem that I'm facing is that there are few tool wires around robotic arm which are getting registered in Octree. I was able to fix it using padding and subsample parameters, but that is affecting quality of whole environment Octomap.

Describe the solution you'd like

We can declare a parameter called something like robot_link_inflation with default value to be 1.0. Then in PlanningSceneMonitor::excludeRobotLinksFromOctree(), we can inflate the meshes according to this parameter.
I can submit a PR, if this works for maintainers.

Describe alternatives you've considered

No response

Additional context

No response

@Ayush1285 Ayush1285 added the enhancement New feature or request label Jan 30, 2025
@Ayush1285
Copy link
Author

@sea-bass Any opinion on this?

@sea-bass
Copy link
Contributor

So is the idea that you don't want to inflate your URDF meshes because that would limit your motion range, but you still want the octomap to filter things out a little further from the collision meshes?

I honestly have no experience with this side of MoveIt, so if this is not already possible, it would be a good addition!

The only thing I can suggest in you trying this is to make sure that you're not inflating the meshes repeatedly as this will cause slowdowns. It could either be storing the inflated meshes in memory, or if this tool happens to use distance vs. occupancy computations, simply subtract out the padding. Again, I'm not really sure how this all works.

Maybe someone like @mikeferguson has more useful input here.

@Ayush1285
Copy link
Author

So is the idea that you don't want to inflate your URDF meshes because that would limit your motion range, but you still want the octomap to filter things out a little further from the collision meshes?

Yes , we will not modify the original mesh itself. But to just filter out the robot links from the octree, we can use inflated mesh or some nearest neighbour based filtering.

@mikeferguson
Copy link
Contributor

I believe the parameters you are looking for are "padding_scale" and padding_offset" in the point cloud updater namespace. I use the depth image version on robot - but the parameters are pretty similar and you can see how my sensors_3d is configured here.

@mikeferguson
Copy link
Contributor

Also, I had to look for a moment - here are the descriptions of those parameters:

  • padding_offset: The size of the padding (in cm).
  • padding_scale: The scale of the padding.

@Ayush1285
Copy link
Author

I believe the parameters you are looking for are "padding_scale" and padding_offset" in the point cloud updater namespace. I use the depth image version on robot - but the parameters are pretty similar and you can see how my sensors_3d is configured here.

Ah yes, I checked the source code. padding_offset and padding_scale params are passed to the geometric_shapes::Shapes module for padding the mesh. Thanks for the help @mikeferguson .
We can add a more verbose description for these parameters, as the current descriptions 'padding_offset: The size of the padding (in cm), padding_scale: The scale of the padding' don't explain much.

@mikeferguson
Copy link
Contributor

We can add a more verbose description for these parameters, as the current descriptions 'padding_offset: The size of the padding (in cm), padding_scale: The scale of the padding' don't explain much.

Yes, please open a PR if you get a chance

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

No branches or pull requests

3 participants