moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

Is there a way to add complex geometry as a Planning Scene object?

Open sampreets3 opened this issue 2 years ago • 2 comments

Hi, I am using MoveIt2 (Foxy) for my project. I see that I am able to add collision objects of the type moveit_msgs::msg::AttachedCollisionObject to the PlanningScene and the robot shall try to plan around the objects. I am interested to know if there exists a method to add more complex geometry (an STL mesh maybe) to the planning scene and manipulate its position and orientation dynamically.

I know that there used to be a tutorial on adding collision objects from a PointCloud object in MoveIt1, it would be great to know if that feature has been already ported to MoveIt2, more importantly in the Foxy Release.

If not, I would like to hear your advice on how to accomplish a similar result on Foxy.

Thanks in advance for the help !

sampreets3 avatar Sep 28 '22 13:09 sampreets3

Yep, that's definitely possible. Here's an example. It's a little old but this part of the API hasn't changed much at all.

https://answers.ros.org/question/209994/publishing-a-collision-object-to-moveit/

Or a tutorial PR that pretty much does the same thing, except with a box, not a mesh. Changing it to a mesh should be pretty easy:

https://github.com/ros-planning/moveit2_tutorials/pull/492/files#diff-9ed90fb827f20edb9797d631678346dc93268dcf61f2bc6d5de287628d063d7c

AndyZe avatar Sep 28 '22 13:09 AndyZe

Hey @AndyZe,

Thanks for the quick response ! I'm going to try out both approaches and will update my answer if I succeed.

sampreets3 avatar Sep 28 '22 14:09 sampreets3

@sampreets3 I hope youve been successful. Ill close this for now. Feel free to reopen if the answer did not work

sjahr avatar Dec 09 '22 22:12 sjahr

Hey @sjahr , yeah sorry for not keeping it up to date. I have indeed solved my problem.

sampreets3 avatar Dec 12 '22 11:12 sampreets3

Hey @sjahr , yeah sorry for not keeping it up to date. I have indeed solved my problem.

Hi @sampreets3, I have been able to load meshes to the planning scene however they are not collision enabled, kindly if you can, share your solution. Thanks

newtonjeri avatar May 04 '24 11:05 newtonjeri