Skip to content

Commit

Permalink
Remove unnecessary std::string()
Browse files Browse the repository at this point in the history
Co-authored-by: Sai Kishor Kothakota <[email protected]>
  • Loading branch information
christophfroehlich and saikishor committed Jan 10, 2024
1 parent b201a59 commit 53fa708
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hardware_interface/src/component_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ std::vector<HardwareInfo> parse_control_resources_from_urdf(const std::string &
if (mimicked_joint_it == hw_info.joints.cend())
{
throw std::runtime_error(
std::string("Mimicked joint '") + joint.parameters.at("mimic") + "' not found");
"Mimicked joint '" + joint.parameters.at("mimic") + "' not found");
}
hardware_interface::MimicJoint mimic_joint;
mimic_joint.joint_index = i;
Expand Down Expand Up @@ -684,15 +684,15 @@ std::vector<HardwareInfo> parse_control_resources_from_urdf(const std::string &
if (!urdf_joint->mimic && joint.is_mimic == MimicAttribute::TRUE)
{
throw std::runtime_error(
"Joint '" + std::string(joint.name) + "' has no mimic information in the URDF.");
"Joint '" + joint.name + "' has no mimic information in the URDF.");
}
if (urdf_joint->mimic && joint.is_mimic != MimicAttribute::FALSE)
{
if (joint.command_interfaces.size() > 0)
{
throw std::runtime_error(
"Joint '" + std::string(joint.name) +
"' has mimic attribute not set to false: Mimic joints cannot have command "
"Joint '" + joint.name +
"' has mimic attribute not set to false: Activated mimic joints cannot have command "
"interfaces.");
}
auto find_joint = [&hw_info](const std::string & name)
Expand Down

0 comments on commit 53fa708

Please sign in to comment.