Skip to content

Commit

Permalink
Improve console messages
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters committed Jul 22, 2021
1 parent aa8686a commit 2d4d4df
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gazebo/rendering/Scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,19 +211,22 @@ Scene::Scene(const std::string &_name, const bool _enableVisualizations,
ignition::transport::Node node;
ignition::msgs::StringMsg req;
ignition::msgs::StringMsg rep;
const std::string serviceName = "/shadow_caster_material_name";
bool result;
unsigned int timeout = 5000;
bool executed = node.Request("/shadow_caster_material_name",
bool executed = node.Request(serviceName,
req, timeout, rep, result);
if (executed)
{
if (result)
this->dataPtr->shadowCasterMaterialName = rep.data();
else
std::cout << "Service call failed" << std::endl;
gzerr << "Service call[" << serviceName << "] failed" << std::endl;
}
else
std::cerr << "Service call timed out" << std::endl;
{
gzerr << "Service call[" << serviceName << "] timed out" << std::endl;
}
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 2d4d4df

Please # to comment.