peci1 / robot_body_filter

Filters the robot's body out of point clouds and laser scans.
BSD 3-Clause "New" or "Revised" License
84 stars 22 forks source link

Add example launch & config for ease of use #18

Closed DoanNguyenTrong closed 2 years ago

DoanNguyenTrong commented 2 years ago

It took me a while to figure it out, so just want to share it with everybody.

peci1 commented 2 years ago

Thank you for your contribution :+1: . Adding an example launch file that would run just robot_body_filter via sensor_filters is definitely a good idea.

However, it is not (yet) suitable for merging. There are several issues I see:

DoanNguyenTrong commented 2 years ago

Hi @peci1, Sorry for my late response while you are extremely responsive. I sadly haven't had enough time, dive deep into the code to contribute more to this amazing project. All of the points that you mentioned are absolutely valid and I've fixed them in the last commit. Sorry for the bad content at the beginning.

Btw, if I want to remove points that are not in the URDF of my robot, but above the robot footprint, Can I do it and how (if possible)? Thanks

peci1 commented 2 years ago

Sorry for my late response while you are extremely responsive.

No hurry, it was just coincidence ;)

Sorry for the bad content at the beginning.

Don't be sorry for it, you took a great job addressing my comments!

Btw, if I want to remove points that are not in the URDF of my robot, but above the robot footprint, Can I do it and how (if possible)?

Take a look at https://wiki.ros.org/pcl_ros/Tutorials/filters#PassThrough . But this filter can only cut by a plane or two planes, which might not be enough. There is also the undocumented CropBox filter which would probably be more suitable as it cuts out a box. But beware that it has problems with organized point clouds in Melodic. Unfortunately, all of these pcl_ros filters are not written using the filters API, but as a nodeletes, so you can't directly plug the pcl_ros filter alongside robot_body_filter in the YAML config file. I'm really thinking about sending a pull request to pcl_ros to fix this, but the repo seems mostly unmaintained, so it's not sure how fast (if ever) it will get merged.


Please, think through the frames/fixed and point_by_point setting as mentioned in the previous comment, and I think then this PR will be ready for merging.

peci1 commented 2 years ago

Thank you for the contribution and patience!

DoanNguyenTrong commented 2 years ago

Learned a lot from you. Thanks and have joy with robots.