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

Removed unnecessary warning messages #718

Merged
merged 4 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 2 additions & 12 deletions src/model_io/urdf/src/URDFDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,7 @@ namespace iDynTree {
LinkIndex linkToWhichTheSensorIsAttached = linkSensor->getParentLinkIndex();
std::string linkToWhichTheSensorIsAttachedName = model.getLinkName(linkToWhichTheSensorIsAttached);

if (model.isFrameNameUsed(linkSensor->getName()))
{
std::string err = "addSensorFramesAsAdditionalFrames is specified as an option, but it is impossible to add the frame of sensor " + linkSensor->getName() + " as there is already a frame with that name";
reportWarning("", "addSensorFramesAsAdditionalFramesToModel", err.c_str());
}
else
if (!model.isFrameNameUsed(linkSensor->getName()))
{
// std::cerr << "Adding sensor " << linkSensor->getName() << " to link " << linkToWhichTheSensorIsAttachedName << " as additional frame"<< std::endl;
bool ok = model.addAdditionalFrameToLink(linkToWhichTheSensorIsAttachedName,linkSensor->getName(),linkSensor->getLinkSensorTransform());
Expand All @@ -291,12 +286,7 @@ namespace iDynTree {

std::string linkToWhichTheSensorIsAttachedName = ftSensor->getSecondLinkName();

if (model.isFrameNameUsed(ftSensor->getName()))
{
std::string err = "addSensorFramesAsAdditionalFrames is specified as an option, but it is impossible to add the frame of sensor " + ftSensor->getName() + " as there is already a frame with that name";
reportWarning("", "addSensorFramesAsAdditionalFramesToModel", err.c_str());
}
else
if (!model.isFrameNameUsed(ftSensor->getName()))
{
Transform link_H_sensor;
bool ok = ftSensor->getLinkSensorTransform(ftSensor->getSecondLinkIndex(),link_H_sensor);
Expand Down
8 changes: 0 additions & 8 deletions src/sensors/src/ModelSensorsTransformers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,6 @@ bool createReducedModelAndSensors(const Model& fullModel,

delete sensorCopy;
}
// If the joint to which is attached the sensor has been lumped, notify that the joint
// sensor will not be present in the reduced model
else {
std::stringstream ss;
ss << "The joint " << parentJointName << " is not in the reduced model, the associated joint sensor won't be present" << std::endl;
reportWarning("", "createReducedModelAndSensors", ss.str().c_str());

}
}
else {
std::stringstream ss;
Expand Down