Thats a very good point. Is already implemented and should work. You can test this e.g. with the machine example.
As long as we dont have a documentation see here:
http://www.box2d.org/manual.htmland search for "Groupindex":
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index). Group indices are usually used for things that are somehow related, like the parts of a bicycle. In the following example, fixture1 and fixture2 always collide, but fixture3 and fixture4 never collide.
fixture1Def.filter.groupIndex = 2;
fixture2Def.filter.groupIndex = 2;
fixture3Def.filter.groupIndex = -8;
fixture4Def.filter.groupIndex = -8;
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------