Skip to content

Commit

Permalink
Merge pull request #60 from scpeters/fixes_from_sdformat
Browse files Browse the repository at this point in the history
Fixes from sdformat
  • Loading branch information
isucan committed Mar 31, 2015
2 parents 771cde3 + ff8e325 commit ccc7d2f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
10 changes: 6 additions & 4 deletions urdf_parser/src/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ bool parseCylinder(Cylinder &y, TiXmlElement *c)
{
y.length = boost::lexical_cast<double>(c->Attribute("length"));
}
catch (boost::bad_lexical_cast &e)
catch (boost::bad_lexical_cast &/*e*/)
{
std::stringstream stm;
stm << "length [" << c->Attribute("length") << "] is not a valid float";
Expand All @@ -180,7 +180,7 @@ bool parseCylinder(Cylinder &y, TiXmlElement *c)
{
y.radius = boost::lexical_cast<double>(c->Attribute("radius"));
}
catch (boost::bad_lexical_cast &e)
catch (boost::bad_lexical_cast &/*e*/)
{
std::stringstream stm;
stm << "radius [" << c->Attribute("radius") << "] is not a valid float";
Expand Down Expand Up @@ -298,7 +298,7 @@ bool parseInertial(Inertial &i, TiXmlElement *config)
{
i.mass = boost::lexical_cast<double>(mass_xml->Attribute("value"));
}
catch (boost::bad_lexical_cast &e)
catch (boost::bad_lexical_cast &/*e*/)
{
std::stringstream stm;
stm << "Inertial: mass [" << mass_xml->Attribute("value")
Expand Down Expand Up @@ -329,7 +329,7 @@ bool parseInertial(Inertial &i, TiXmlElement *config)
i.iyz = boost::lexical_cast<double>(inertia_xml->Attribute("iyz"));
i.izz = boost::lexical_cast<double>(inertia_xml->Attribute("izz"));
}
catch (boost::bad_lexical_cast &e)
catch (boost::bad_lexical_cast &/*e*/)
{
std::stringstream stm;
stm << "Inertial: one of the inertia elements is not a valid double:"
Expand Down Expand Up @@ -480,6 +480,8 @@ bool parseLink(Link &link, TiXmlElement* config)
// Assign the first collision to the .collision ptr, if it exists
if (!link.collision_array.empty())
link.collision = link.collision_array[0];

return true;
}

/* exports */
Expand Down
4 changes: 2 additions & 2 deletions urdf_parser/src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ boost::shared_ptr<ModelInterface> parseURDF(const std::string &xml_string)
logDebug("urdfdom: successfully added a new material '%s'", material->name.c_str());
}
}
catch (ParseError &e) {
catch (ParseError &/*e*/) {
logError("material xml is not initialized correctly");
material.reset();
model.reset();
Expand Down Expand Up @@ -170,7 +170,7 @@ boost::shared_ptr<ModelInterface> parseURDF(const std::string &xml_string)
logDebug("urdfdom: successfully added a new link '%s'", link->name.c_str());
}
}
catch (ParseError &e) {
catch (ParseError &/*e*/) {
logError("link xml is not initialized correctly");
model.reset();
return model;
Expand Down
9 changes: 5 additions & 4 deletions urdf_parser/src/urdf_model_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
try {
joint_state->position.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
}
catch (boost::bad_lexical_cast &e) {
catch (boost::bad_lexical_cast &/*e*/) {
throw ParseError("position element ("+ pieces[i] +") is not a valid float");
}
}
Expand All @@ -116,7 +116,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
try {
joint_state->velocity.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
}
catch (boost::bad_lexical_cast &e) {
catch (boost::bad_lexical_cast &/*e*/) {
throw ParseError("velocity element ("+ pieces[i] +") is not a valid float");
}
}
Expand All @@ -135,7 +135,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
try {
joint_state->effort.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
}
catch (boost::bad_lexical_cast &e) {
catch (boost::bad_lexical_cast &/*e*/) {
throw ParseError("effort element ("+ pieces[i] +") is not a valid float");
}
}
Expand All @@ -145,7 +145,8 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
// add to vector
ms.joint_states.push_back(joint_state);
}
};
return false;
}



Expand Down
1 change: 1 addition & 0 deletions urdf_parser/src/urdf_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ bool parseRay(Ray &ray, TiXmlElement* config)
}
}
}
return false;
}

boost::shared_ptr<VisualSensor> parseVisualSensor(TiXmlElement *g)
Expand Down
2 changes: 1 addition & 1 deletion urdf_parser/src/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

namespace urdf{

bool parseWorld(World &world, TiXmlElement* config)
bool parseWorld(World &/*world*/, TiXmlElement* /*config*/)
{

// to be implemented
Expand Down

0 comments on commit ccc7d2f

Please sign in to comment.