Prevent collison between some models in the world
I am trying to disable collision among mobile robots in a swarm. The swarm is usually made up of hundreds of robots.
These robots are expected to perform a foraging task within a square boundary in the world. Thus, when they collide with this boundary, they should change their direction of motion.
However, when robots collide with each other, they should pass through each other (as if there was no collision).
I am using the collide_bitmask sdf tag as suggested in the answer for this question: http://answers.gazebosim.org/question/17216/how-to-turn-off-all-collisions/.
I realised that for the bitmask to perform task I want, the values of the bitmask should be 1, 2, 4, 8 ... (2^n) - 1. Where n is the number of robots I want to include in the world. However, this is restricted to (2^16) - 1 value. Thus, I will not be able to implement this for more than 16 robots.
Please is there any idea of how I should do this?
Asked by elcymon on 2018-02-02 06:37:04 UTC
Answers
I'm not entirely sure this can be achieved.
If you were to disable collisions of the robots, they would pass through each other however they would most definitely fall through the ground plane which is not you want. You could technically simulate collision with the wall with a simple plugin however that still wouldn't remove the problem of falling through the floor.
The only weird possibility I can imagine in my mind is that you insert multiple ground planes into the world (each at a different height) so that every robot would have its own level.
Asked by Raskkii on 2018-02-06 09:51:43 UTC
Comments
Probably the weird approach is the way to go. Or maybe redoing the whole thing with actors instead of models and use plugin to control the boundary collisions. Do you think this will work?
Asked by elcymon on 2018-02-06 10:10:00 UTC
I haven't worked with actors before but from what I understand, actors can only be set to move in fixed routes and depending on your robots if they are wheeled vehicles or something else (with actors you have disabled all physics so they wouldn't roll but rather move stagnantly) so it might not be what you're after. You could definitely try though.
Asked by Raskkii on 2018-02-06 10:42:54 UTC
Comments