2015-06-28 21:09:21 +00:00
|
|
|
#ifndef BULLET_URDF_IMPORTER_H
|
|
|
|
#define BULLET_URDF_IMPORTER_H
|
2015-04-22 23:35:27 +00:00
|
|
|
|
|
|
|
#include "URDFImporterInterface.h"
|
|
|
|
|
|
|
|
|
2015-06-28 21:09:21 +00:00
|
|
|
class BulletURDFImporter : public URDFImporterInterface
|
2015-04-22 23:35:27 +00:00
|
|
|
{
|
|
|
|
|
2015-06-28 21:09:21 +00:00
|
|
|
struct BulletURDFInternalData* m_data;
|
2015-04-22 23:35:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2015-06-28 21:09:21 +00:00
|
|
|
BulletURDFImporter(struct GUIHelperInterface* guiHelper);
|
2015-04-23 22:41:17 +00:00
|
|
|
|
2015-06-28 21:09:21 +00:00
|
|
|
virtual ~BulletURDFImporter();
|
2015-04-23 22:41:17 +00:00
|
|
|
|
|
|
|
virtual bool loadURDF(const char* fileName);
|
|
|
|
|
|
|
|
const char* getPathPrefix();
|
|
|
|
|
|
|
|
void printTree(); //for debugging
|
2015-04-22 23:35:27 +00:00
|
|
|
|
2015-04-23 22:41:17 +00:00
|
|
|
virtual int getRootLinkIndex() const;
|
2015-04-22 23:35:27 +00:00
|
|
|
|
|
|
|
virtual void getLinkChildIndices(int linkIndex, btAlignedObjectArray<int>& childLinkIndices) const;
|
|
|
|
|
|
|
|
virtual std::string getLinkName(int linkIndex) const;
|
|
|
|
|
|
|
|
virtual std::string getJointName(int linkIndex) const;
|
|
|
|
|
|
|
|
virtual void getMassAndInertia(int linkIndex, btScalar& mass,btVector3& localInertiaDiagonal, btTransform& inertialFrame) const;
|
|
|
|
|
|
|
|
virtual bool getJointInfo(int urdfLinkIndex, btTransform& parent2joint, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit) const;
|
|
|
|
|
2015-04-23 22:41:17 +00:00
|
|
|
virtual int convertLinkVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame) const;
|
2015-04-22 23:35:27 +00:00
|
|
|
|
|
|
|
virtual class btCompoundShape* convertLinkCollisionShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame) const;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-06-28 21:09:21 +00:00
|
|
|
#endif //BULLET_URDF_IMPORTER_H
|