Add body name when loading urdf.
This commit is contained in:
@@ -1311,6 +1311,11 @@ int BulletMJCFImporter::getRootLinkIndex() const
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string BulletMJCFImporter::getBodyName() const
|
||||
{
|
||||
return m_data->m_fileModelName;
|
||||
}
|
||||
|
||||
bool BulletMJCFImporter::getLinkColor(int linkIndex, btVector4& colorRGBA) const
|
||||
{
|
||||
// UrdfLink* link = m_data->getLink(linkIndex);
|
||||
|
||||
@@ -41,6 +41,8 @@ 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;
|
||||
|
||||
virtual std::string getBodyName() const;
|
||||
|
||||
/// 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;
|
||||
|
||||
Reference in New Issue
Block a user