# Definition of Collision Frame and Inertial Frame in PyBullet or Other Simulation Software

I am doing simulation of my robot with PyBullet now, but I guess this question applies to other simulation software as well.

When I am using the functions createCollisionShape and createMultiBody, I am really confused about the definition of parameters like collisionFramePosition and linkInertialFramePositions. What is the definition of collision frame and inertial frame? The Quickstart Guide on the PyBullet website does not seem to have an explanation. Could someone tell me the definition or give me some resources to read?

My original answer on this confused linkInertialFramePositions with baseInertialFramePosition, so here is a (hopefully ;) ) more accurate description of the two:
The linkInertialFramePositions parameter is used to define the "local" inertial frame of reference of the given link with respect to the link frame position. Thus, if the link frame is located at [0.5, 0.5, 0.5] at a given point in time, then the value of linkInertialFramePositions will act as an offset to [0.5, 0.5, 0.5]. This is important when considering the functions applyExternalForce/Torque as specifying flags=p.LINK_FRAME will have this force/torque acting with respect to the local inertial frame. So, Although perhaps an overly broad generalization, the link inertial frames define the origin of forces and torques acting on a body relative to the link frame.
The collisionFramePosition and visualFramePosition variables act similarly, but deal with moving the actual shapes around, nothing inherently connected to any forces/torques you might appply (although I would imagine this will effect how the body behaves with respect to forces/torques applied in the local frame). These values will act as a sort of offset to the link frame when added to a multibody system. In other words, if a link is added to a multibody system with the aforementioned variables both set to [0.1, 0.1, 0.1], the link will be rendered at an offset of [0.1, 0.1, 0.1] with respect to the link frame, and its collision shape will also be at the same offset with respect to the link frame. Now, if you would like to change the link frame position instead of working with these fixed offsets, createMultiBody has a flag linkPositions that can be used to change the position of a link with respect to its parent.