Giter Site home page Giter Site logo

Comments (4)

luca-della-vedova avatar luca-della-vedova commented on May 27, 2024

I'm not too sure about this default, it seems the docs specify that the default should be 0 if unspecified (here), This also seems to be the behavior for the ROS parser

from urdf-rs.

rydb avatar rydb commented on May 27, 2024

I'm not too sure about this default, it seems the docs specify that the default should be 0 if unspecified (here), This also seems to be the behavior for the ROS parser

looking at the docs them selves:

<limit> (required only for revolute and prismatic joint)

    An element can contain the following attributes:

    lower (optional, defaults to 0)

        An attribute specifying the lower joint limit (in radians for revolute joints, in meters for prismatic joints). Omit if joint is continuous. 

    upper (optional, defaults to 0)

        An attribute specifying the upper joint limit (in radians for revolute joints, in meters for prismatic joints). Omit if joint is continuous. 
 Omit if joint is continuous. 

this implies there are instances where ROS assumes there are no limits like on continuous joints. I suppose it makes sense from a safety sense, but its still inconvenient.

Maybe there should be a JointLimit::unlimited() then?

from urdf-rs.

luca-della-vedova avatar luca-della-vedova commented on May 27, 2024

Yap there are continuous joints, it's a separate type (not revolute), have a look here.
Now someone could make the case that we could exploit Rust's enum system better and make sure JointLimit is only contained if the joint is of a variant where it makes sense, but that would make serialization / deserialization a fair bit trickier

from urdf-rs.

taiki-e avatar taiki-e commented on May 27, 2024

One option would be to add a method that returns Option<Range> based on JointType like this.

Given that it would complicate the parsing code, it would not necessarily be easy to embed the limit in the JointType. However, it would probably be the most type-safe way to do it.

from urdf-rs.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.