Is it possible to check whether a model intersects some geometry?
I would like to use Gazebo for simulating underwater vehicles. Ideally, I would want to know how much of my vehicle's volume is submerged in a water body, this allows me to calculate how much buoyancy to apply to make it float.
However, I can imagine more uses for a "volume query" if you will:
Triggers for world changes, e.g. some event occurs if the robot enters or exits the volume
Sensor behavior changes, e.g. a kinect won't work in the "outdoor" volume
For external simulators: e.g. Radio-dropout zones in RoboCup Rescue (though this should be implemented as a wifi blocking volume rather than a "wifi doesn't work here" volume)
Ideally, there should be three states: Outside, Transition (robot intersects boundary), Inside
I know this is possible with Bullet, I've done something similar, but it's necessary to set up some collision masks and do a manual query. Is there a way to access the underlying physics engine? Also, is it possible to add such logical geometry without visual and only "non-colliding" (does this make sense?) collision shapes to explicitly ask them for collisions later in a plugin?