Collision detection in Python
Hello everyone! I would like to ask a simple question.
How can we detect collisions in Python? (as simple as possible) My goal is as follows:
- Want to check a state validity and a trajectory validity by evaluating self-collision and collision with obstacles.
- Want to use a PR2 robot.
- Want to add some simple primitives like a box, a cylinder, etc. to the scene.
- Want to attach simple primitives to the robot body (assuming that the robot is grasping an object).
- Not want to implement too much.
I found several solutions as follows, but I want simpler solutions.
- Using the /environment_server node through the services.
- This is slow, and has a problem to detect collisions between cylinders as reported here.
- Using MoveIt!.
- This is nice, but the collision detection tutorial seems to be only for C++.
- I found a Python API and its tutorial, but the moveit_commander does not provide a collision check interface.
- Using FCL.
- Only has a C++ interface.
Hence, to the best of my knowledge, I need to implement a python interface to call C++ functions (by using either the Python/C interface or the ROS communication), which sounds a bit complicated.
If anyone can suggest simpler solutions, please tell me.
Thanks in advance.
As to the MoveIt option lacking a Python interface: you might want to send a message to the moveit-users list about this.