Skip to content

Commit

Permalink
Add warning if GAZEBO_RESOURCE_PATH may not be set correctly (#2991)
Browse files Browse the repository at this point in the history
* Add error message to RT shader
* Improve error message for loading worlds/empty.world

Signed-off-by: Audrow Nash <audrow@hey.com>
  • Loading branch information
paudrow authored and scpeters committed May 14, 2021
1 parent e714bc9 commit d4525ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions gazebo/Server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,13 @@ bool Server::ParseArgs(int _argc, char **_argv)
{
gzwarn << "Falling back on worlds/empty.world\n";
if (!this->LoadFile("worlds/empty.world", physics))
{
gzerr << "worlds/empty.world could not be opened, "
<< "probably because it was not found. "
<< "Your GAZEBO_RESOURCE_PATH is probably improperly set. "
<< "Have you sourced <prefix>/share/gazebo/setup.sh?\n";
return false;
}
}

if (this->dataPtr->vm.count("profile"))
Expand Down
4 changes: 3 additions & 1 deletion gazebo/rendering/RTShaderSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,9 @@ bool RTShaderSystem::GetPaths(std::string &coreLibsPath, std::string &cachePath)
// Core shader lib not found -> shader generating will fail.
if (coreLibsPath.empty())
{
gzerr << "Unable to find shader lib. Shader generating will fail.";
gzerr << "Unable to find shader lib. Shader generating will fail. "
<< "Your GAZEBO_RESOURCE_PATH is probably improperly set. "
<< "Have you sourced <prefix>/share/gazebo/setup.sh?\n";
return false;
}

Expand Down

0 comments on commit d4525ae

Please sign in to comment.