Skip to content

Commit

Permalink
Encode visual/collision name attribute in ShapeNode name
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Aug 22, 2021
1 parent 0dafab2 commit fc2d5e4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dart/utils/sdf/SdfParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,12 @@ void readVisualizationShapeNode(
const common::Uri& baseUri,
const common::ResourceRetrieverPtr& retriever)
{
assert(hasAttribute(vizShapeNodeEle, "name"));
const std::string visualName = getAttributeString(vizShapeNodeEle, "name");
dynamics::ShapeNode* newShapeNode = readShapeNode(
bodyNode,
vizShapeNodeEle,
bodyNode->getName() + " - visual shape",
bodyNode->getName() + " - " + visualName,
baseUri,
retriever);

Expand All @@ -1052,10 +1054,12 @@ void readCollisionShapeNode(
const common::Uri& baseUri,
const common::ResourceRetrieverPtr& retriever)
{
assert(hasAttribute(collShapeNodeEle, "name"));
const std::string collName = getAttributeString(collShapeNodeEle, "name");
dynamics::ShapeNode* newShapeNode = readShapeNode(
bodyNode,
collShapeNodeEle,
bodyNode->getName() + " - collision shape",
bodyNode->getName() + " - " + collName,
baseUri,
retriever);

Expand Down

0 comments on commit fc2d5e4

Please sign in to comment.