Skip to content

Commit

Permalink
Merge pull request #134 from IRSL-tut/pr_fix_match
Browse files Browse the repository at this point in the history
[RobotAssembler.cpp] fix: checkAttach
  • Loading branch information
YoheiKakiuchi authored Jun 27, 2024
2 parents 0a23aad + 984799f commit a2cdfe7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/RobotAssembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ bool RoboasmRobot::checkAttach(RoboasmCoordsPtr robot_or_parts,
ConnectingTypeMatch * &_res_match, bool check)
{
if (check && !checkCorrectPoint(robot_or_parts, _parts_point, _robot_point)) {
// [todo]
ERROR_STREAM(" points are not correct : " << _parts_point->name() << ", " << _robot_point->name());
return false;
}
std::vector<ConnectingTypeID> &rtp = _robot_point->info->type_list;
Expand All @@ -771,13 +771,16 @@ bool RoboasmRobot::checkAttach(RoboasmCoordsPtr robot_or_parts,
} else {
tm_ = settings->searchConnection(rtp[i], ptp[j], _config->index);
}
if (!!tm_) break;
if (!!tm_) {
goto exit_check;
}
}
}
if (!tm_) {
// [todo]
ERROR_STREAM(" cloud not find type matching : " << _parts_point->name() << ", " << _robot_point->name());
return false;
}
exit_check:
_res_match = tm_;
if( _config == nullptr ) {
_config = &( settings->listConnectingConfiguration[tm_->allowed_configuration.front()] );
Expand Down

0 comments on commit a2cdfe7

Please sign in to comment.