-
Notifications
You must be signed in to change notification settings - Fork 114
Collisions
Collision objects in Phobos are basic meshes of collision
phobostype. Basically,
you can use any mesh (be it CAD data or a simple cube) to represent a collision object.
It is important though, that the actual collision type is determined by Define Geometry, which allows you to set a collision box for an ever complex mesh or handle a simple sphere as a mesh collision.
Collision objects just need two steps to be configured properly: Set
Phobostype (to collision
) and Define Geometry (at your liking).
Additional features include adjustments of the collision groups.
The Set Collision Group button allows to select multiple layers of objects with which an object can collide. Clicking the respective fields, the bits of the underlying collision bitmask are flipped.
Phobos uses Blender's existing functionality to define collision groups for physics simulation. Thus, its operator simply displays the collision 'layers' that can be found in the Physics tab of the Properties GUI area:
Although 20 collision layers are supported by Blender, the MARS simulation environment only supports 16. Thus, only the first 16 Blender layers serve this purpose, while any objects using one of the last 4 layers consequently do not use collision bitmasks. When exporting the model this will be presented as a waring if applicable.
In URDF, any collision object will collide with any other collision object, ergo there is no inherent collision avoidance between links. This poses a problem if collision geometries are approximations and might sometimes collide even though the real robot would not. A classic case may be box geometries used for limbs of a robot that will collide at the joint if turned. For this reason, it is in most cases necessary to define which collision objects of a model can collide with which other collision objects. In the ROS community, the solution for this problem comes in the form of SRDF and Phobos does support export of this format. However the MARS simulation does not currently read SRDF and therefore the same information is by default exported to SMURF.
Important Note: As a default, Phobos (and MARS, for that matter) assumes that no collision objects of a link can collide with collision objects of its parent link or child link. If you need such close collisions, consider using additional joints.
MARS internally uses collision bitmasks to efficiently exclude collisions between objects. This makes it easy to assign multiple objects to the same group of collision behaviour. For instance, this can be used if all limbs on the left side of a robot should be able to collide with all limbs on the right side of the robot, but not with the main body. This feature is also helpful to exclude such parts of the robot from collision which can kinematically never collide in the first place, thereby speeding up the simulation by avoiding unnecessary collision checks. While SRDF explicitly excludes pairs of links from colliding, Phobos allows to group together collision properties, effectively recreating the bitmasks used in MARS anyways.
Back to top.