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

Diagnostics for invalid numeric input #228

Open
scpeters-test opened this issue Mar 13, 2020 · 0 comments
Open

Diagnostics for invalid numeric input #228

scpeters-test opened this issue Mar 13, 2020 · 0 comments
Labels
enhancement New feature or request minor

Comments

@scpeters-test
Copy link
Collaborator

Original report (archived issue) by Jeremy Nimmer (Bitbucket: Jeremy Nimmer).


# Summary

When a user makes a mistake and provides invalid data, e.g., for a (link pose)[http://sdformat.org/spec?ver=1.6&elem=link#link_pose], the sdformat parser should provide a diagnostic.

# Motivation

In many cases `*.sdf` files are authored by hand, possibly even with xacro or related tools. It is easy to accidentally make a typo and end up with a file that appears to be valid, but in fact will behave poorly in simulation for some unknown reason, e.g., if 1.O1e2 is parsed as "1." instead of "101.".

# Describe alternatives you've considered

I would appreciate if the parser provided an API channel for errors, but I believe this isn't available yet – even for mistakes that it does provide diagnostics for. Starting out with log printouts for numeric typos would be a step in the right direction.

# Additional context

Here is an example stanza that does not produce any diagnostics as of tag/sdformat9_9.1.0:

      <collision name='link1_collision1'>
        <pose>foo foo foo foo foo foo foo foo -1e899999</pose>
        <geometry>
          <plane>
            <normal>1.0 2.0 3.0 foo</normal>
          </plane>
        </geometry>
        <surface>
          <friction>
            <ode>
              <mu>0.8 gravitons</mu>
              <mu2>0.3 muons</mu2>
            </ode>
          </friction>
        </surface>
      </collision>

@scpeters-test scpeters-test added minor enhancement New feature or request labels Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor
Projects
None yet
Development

No branches or pull requests

0 participants