How to check collision between several robots?

4 visualizzazioni (ultimi 30 giorni)
Eva
Eva il 13 Gen 2021
Spostato: Remo Pillat il 16 Lug 2024
I have created four robots (rigidBodyTrees) with the Robotics Toolbox.
In reality, this is one robot with four arms.
I chose to create four different robots, because I want to ignore self collision (the self being the same arm).
I want to generate configurations for each arm (each robot) and then check whether there is collision between them.
How do I do this? The documentation says:
This suggests that I can only enter the configuration for one robot and the worldObjects cannot be placed depending on the configuration that is generated but are 'fixed'.
I really hope someone can help me!
  3 Commenti
Eva
Eva il 14 Gen 2021
Thank you for your answer! I used getTransform and I think this worked. However, something in checkCollision is not working. In my code, I create a lot of random configurations and for each one I check the collision with the robot being one of the arms and the worldObjects being the rest of the arms. I check this for each of the arms. However, when I show one without collision, I still see that collision occurs between the arms (which I modeled as different robots) (see picture). I am sure that I am showing the correct configuration, which I tested with the homeConfiguration. I also find that sometimes there is collision for 1 out of 4 robot arms being used as the 'checkCollision-for-robot-arm'. Since I ignore self collision, this should not be possible; if arm 1 collides with arm 2, arms 2 also collides with arm 1 and thus the collision count should be 2.
To check collision, I use:
isColliding = checkCollision(robot,config,worldCollisionArray,'IgnoreSelfCollision','on')
For showing the robot, which only consists of collisionCylinders and collisionBoxes, I use:
show(robot,config,'Collisions','on','Visuals','off','Frames','on')
Is there a bug in the checkCollision function or am I doing something wrong?
Yiping Liu
Yiping Liu il 13 Giu 2021
Can you share your script so we can take a detailed look?

Accedi per commentare.

Risposte (1)

Karsh Tharyani
Karsh Tharyani il 14 Giu 2021
Spostato: Remo Pillat il 16 Lug 2024
Hi Eva,
Please reach out to Technical Support with your question. You can provide them with the supporting files that reproduce the issue.
Best,
Karsh

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by