Add body name when loading urdf.
This commit is contained in:
@@ -269,6 +269,11 @@ std::string BulletURDFImporter::getLinkName(int linkIndex) const
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string BulletURDFImporter::getBodyName() const
|
||||
{
|
||||
return m_data->m_urdfParser.getModel().m_name;
|
||||
}
|
||||
|
||||
std::string BulletURDFImporter::getJointName(int linkIndex) const
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
virtual int getRootLinkIndex() const;
|
||||
|
||||
virtual void getLinkChildIndices(int linkIndex, btAlignedObjectArray<int>& childLinkIndices) const;
|
||||
|
||||
virtual std::string getBodyName() const;
|
||||
|
||||
virtual std::string getLinkName(int linkIndex) const;
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@ public:
|
||||
|
||||
///pure virtual interfaces, precondition is a valid linkIndex (you can assert/terminate if the linkIndex is out of range)
|
||||
virtual std::string getLinkName(int linkIndex) const =0;
|
||||
|
||||
virtual std::string getBodyName() const = 0;
|
||||
|
||||
/// optional method to provide the link color. return true if the color is available and copied into colorRGBA, return false otherwise
|
||||
virtual bool getLinkColor(int linkIndex, btVector4& colorRGBA) const { return false;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user