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

Invalid default value for elements of type <time> #642

Closed
FirefoxMetzger opened this issue Jul 28, 2021 · 2 comments · Fixed by #662
Closed

Invalid default value for elements of type <time> #642

FirefoxMetzger opened this issue Jul 28, 2021 · 2 comments · Fixed by #662
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@FirefoxMetzger
Copy link
Contributor

In types.xsd time is defined as a simple double, however inside state.sdf a string value of the form "0 0" is used as default. The documentation agrees with the latter and says it should be of the form "{seconds} {nanoseconds}.

I implemented a local fix inside types.xsd of the form

  <xsd:simpleType name="time">
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="\d+ \d+"/>
    </xsd:restriction>
  </xsd:simpleType>

However, it still makes sense to bring it up as an issue here, since I don't know if this is the preferred solution.

@chapulina
Copy link
Contributor

The suggested fix makes sense to me

@chapulina chapulina added the help wanted Extra attention is needed label Aug 9, 2021
@azeey
Copy link
Collaborator

azeey commented Aug 9, 2021

I believe "{seconds} {nanoseconds}" is what's used by Gazebo classic, so the fix makes sense to me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
3 participants