What is the difference between a rigid body and a rigid shape? I have found that there is one rigid body for each link in my URDF file (i.e. there are 61 of them), but there are only 37 rigid shapes. Each of the links in the file is either a cylinder or a sphere.
Usually, a rigid body consists of one or more rigid shapes. Shapes provide geometric, collision descriptions of the rigid body, while rigid bodies have physics properties associated with them, like mass and inertia tensors. Imaging for example convex decomposition of some object - it has the same mass and properties and a number of rigid convex shapes associated with it.
Without having any information about your URDF it’s pretty hard to understand why you have a smaller number of shapes than rigid bodies.
Without having any information about your URDF it’s pretty
hard to understand why you have a smaller number of shapes
than rigid bodies.
I found the cause of the discrepancy. My URDF file contains 61 links, but many of those are dummy links (used to simulate ball joints) that have an inertia, but no geometry. 37 of the links have collision geometry.