Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[multibody] Hotfix for PR 22649 duplicate frame name problem #22691

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions multibody/tree/weld_joint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ std::unique_ptr<internal::Mobilizer<T>> WeldJoint<T>::MakeMobilizerForJoint(
// its model instance) and the name of the parent or child frame (not
// necessarily unique). New frames go in the joint's model instance.
auto F_frame_name = [this, tree](const Frame<T>& frame) -> std::string {
const std::string F_name =
fmt::format("{}_{}_F", this->name(), frame.name());
DRAKE_DEMAND(!tree->HasFrameNamed(F_name, this->model_instance()));
std::string F_name = fmt::format("{}_{}_F", this->name(), frame.name());
while (tree->HasFrameNamed(F_name, this->model_instance())) F_name += "_";
return F_name;
};

Expand Down