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

YAML errors in map_server not caught #1010

Open
celynw opened this issue Jul 10, 2020 · 2 comments
Open

YAML errors in map_server not caught #1010

celynw opened this issue Jul 10, 2020 · 2 comments

Comments

@celynw
Copy link

celynw commented Jul 10, 2020

When running rosrun map_server map_server map.yaml or equivalent, any errors cause it to close without producing any output.
For instance, setting the resolution as a string.
I see in the code (map_server/src/main.cpp) it is supposed to produce a ROS_ERROR if the resolution could not be loaded, but this is never printed.

        try {
          doc["resolution"] >> res;
        } catch (YAML::InvalidScalar &) {
          ROS_ERROR("The map does not contain a resolution tag or it is invalid.");
          exit(-1);
        }

In my usage I never get any of these error messages.

I can't find and specifically catch what is being thrown, but catching std::exception::what() does work:

yaml-cpp: error at line 0, column 0: bad conversion

Environment:

  • OS: Ubuntu 18.04
  • Branch: melodic-devel
  • Commit: b496f689
@acaviedes15
Copy link

any update?

@maker-ATOM
Copy link

Setting,

resolution: "0.050000"

within the .yaml

Allows the current method to parse the resolution, is this acceptable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants