expose the local inertial frame for each link in the shared memory API

struct b3LinkState
{
    double m_worldPosition[3];//this is the inertial frame
    double m_worldOrientation[4];

    double m_localInertialPosition[3];//this is the local frame from inertial to link frame
    double m_localInertialOrientation[4];
};

  const btTransform link_frame_world =
               inertial_frame_world * m_local_inertial_frame->inverse();
This commit is contained in:
Erwin Coumans
2016-04-29 14:45:15 -07:00
parent 1635a9d594
commit ab4299f517
4 changed files with 34 additions and 2 deletions

View File

@@ -105,12 +105,18 @@ struct b3DebugLines
const float* m_linesColor;//float red,green,blue times 'm_numDebugLines'.
};
///b3LinkState provides extra information such as the Cartesian world coordinates of the link
///relative to the world reference frame. Orientation is a quaternion x,y,z,w
///b3LinkState provides extra information such as the Cartesian world coordinates
///center of mass (COM) of the link, relative to the world reference frame.
///Orientation is a quaternion x,y,z,w
///Note: to compute the URDF link frame (which equals the joint frame at joint position 0)
///use URDF link frame = link COM frame * inertiaFrame.inverse()
struct b3LinkState
{
double m_worldPosition[3];
double m_worldOrientation[4];
double m_localInertialPosition[3];
double m_localInertialOrientation[4];
};
//todo: discuss and decide about control mode and combinations