Ask Your Question
1

Keep track of the shortest distance to collision using python

asked 2017-09-01 10:02:55 -0500

d0v0b gravatar image

Hi, I'm currently using the moveit_commander through python to command moveit, and everything works great. However, I want to calculate the shortest distance to collision along the planned trajectory. I found FCL might be able to do that, but materials I found are mainly C++ codes, and it seems there's no released python wrapper for the planning scene. I've also searched through moveit_commander namespace reference ( http://docs.ros.org/jade/api/moveit_c... ), yet still can't find anything relevant. Is there anything in python or unreleased python wrapper I can use to achieve what I want to do? Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-09-02 07:03:00 -0500

v4hn gravatar image

Quite a lot of MoveIt is not exposed as python interfaces. I am not aware of a python wrapper for the planning scene. So if you want to use it as you propose, you will either have to write it in C++ or write a python wrapper for the PlanningScene class. The latter is definitely no small endeavor.

In C++ you will need to have a maintained (i.e. updating) planning scene. If you just create a PlanningScene object yourself, this will always be empty and not reflect the current world state. You could create a PlanningSceneMonitor to achieve this, although it would be much faster if you created a MoveGroupCapability for it. An alternative would be to check the generated trajectory beforehand.

edit flag offensive delete link more
0

answered 2019-08-23 05:45:23 -0500

macrot51 gravatar image

Hello d0v0b, could you find an solution?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-09-01 10:02:55 -0500

Seen: 139 times

Last updated: Aug 23