Home | Tutorials | Wiki | Issues
Ask Your Question

Prevent collison between some models in the world

asked 2018-02-02 05:37:04 -0600

elcymon gravatar image

updated 2018-02-06 05:35:39 -0600

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....

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-06 08:51:43 -0600

Raskkii gravatar image

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.

edit flag offensive delete link more


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?

elcymon gravatar imageelcymon ( 2018-02-06 09:10:00 -0600 )edit

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.

Raskkii gravatar imageRaskkii ( 2018-02-06 09:42:54 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-02-02 05:37:04 -0600

Seen: 51 times

Last updated: Feb 06