How to check collision between several robots?

1 次查看(过去 30 天)
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 个评论
Eva
Eva 2021-1-14
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 2021-6-13
Can you share your script so we can take a detailed look?

请先登录,再进行评论。

回答(1 个)

Karsh Tharyani
Karsh Tharyani 2021-6-14
移动:Remo Pillat 2024-7-16
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

类别

Help CenterFile Exchange 中查找有关 Robotics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by