Collisions - YousafRaja/URoboSim GitHub Wiki
Disabling Self-Collisions
Self-collision needs to be disabled on certain links which contain meshes that will collide with other links.
This is done during robot generation by first adding every link to a custom collision channel that's reserved for the robot (currently using ECC_GameTraceChannel1). In the case of the pr2, self-collision is disabled for the wheel, shoulder, arm and finger joints by setting them to ignore the robot's custom collision channel. The links to filter out can be set in URoboSimEd (the visual interface for URoboSim).
URDF Collision Tags
At the moment, the URDF parser has been modified to ignore all collision tags and only use the visual tags when creating the robot. Part of the issue is that unreal does not have cylinder as a primitive and can only use complex mesh collisions on a static object.
Adding Custom FBX Collisions
Since URoboSim currently ignores mesh collision tags in the URDF, it is relying on UE4 to generate collisions when the mesh is imported. Most of the time this works out fine but if for example you have a mesh of a wheel, the collision that UE4 generates will likely not be insufficient. In this case one needs to add a custom collision shape to the wheel's fbx. This is how it was done for the pr2's wheel with Blender.
- File->Import->FBX, select pr2's wheel fbx file
- Create->Cylinder
- Rename the cylinder to UCX_wheel_M_mod. It has to follow this naming convention of UCX_[name of imported fbx].
- Reshape the UCX_wheel_M_mod to be the desired shape for collisions.
- Save and export
To verify: Drag the FBX into UE4 and double click on it to open the FBX editor window. Click on Collision->Simple collision and you should see a green outline of the newly added custom collision.