Coder Social home page Coder Social logo

Comments (8)

cdellin avatar cdellin commented on May 21, 2024

Random code comments: (a) index -> q_index, (b) xrange -> enumerate.

from prpy.

cdellin avatar cdellin commented on May 21, 2024

Also (c) IsContinuous() -> IsCircular().

from prpy.

psigen avatar psigen commented on May 21, 2024

Agree with the philosophy, Inf on continuous makes sense to me.

Will look at code prettification in depth later. Think you can probably
make a pretty boolean array and slice it like:

is_continuous = [robot.GetJointFromIndex(i).IsCircular() for i in
robot.GetActiveDOFIndices()]
q_min[is_continuous] = -numpy.inf
q_max[is_continuous] = numpy.inf

On Wed, Feb 25, 2015 at 4:26 PM, cdellin [email protected] wrote:

Random code comments: (a) index -> q_index, (b) xrange -> enumerate.

β€”
Reply to this email directly or view it on GitHub
#61 (comment)
.

from prpy.

mkoval avatar mkoval commented on May 21, 2024

@cdellin Thanks!

@psigen That's not possible. IsCircular can theoretically be different for each DOF of a multi-DOF joint. E.g. you could have a 3-DOF spherical joint where only a subset of the DOFs are continuous. I don't think we can do much better than what I listed above if we want to handle this case.

from prpy.

siddhss5 avatar siddhss5 commented on May 21, 2024

LGTM.
We should run a contest for the prettiest list comprehension of the above code :).

from prpy.

cdellin avatar cdellin commented on May 21, 2024

Best I could do:

q_min, q_max = robot.GetActiveDOFLimits()

jointof = robot.GetJointFromDOFIndex
iscirc = lambda d: jointof(d).IsCircular(d-jointof(d).GetDOFIndex())
q_circ = [iscirc(d) for d in robot.GetActiveDOFIndices()]
q_min[q_circ] = -numpy.inf
q_max[q_circ] =  numpy.inf

from prpy.

sjavdani avatar sjavdani commented on May 21, 2024

Shouldn't this be changed higher in the chain? That is, shouldn't
GetActiveDOFLimits() return +-numpy.inf when IsContinuous is true?

On Wed, Feb 25, 2015 at 5:31 PM cdellin [email protected] wrote:

Best I could do:

q_min, q_max = robot.GetActiveDOFLimits()

jointof = robot.GetJointFromDOFIndex
iscirc = lambda d: jointof(d).IsCircular(d-jointof(d).GetDOFIndex())
q_circ = [iscirc(d) for d in robot.GetActiveDOFIndices()]
q_min[q_circ] = -numpy.inf
q_max[q_circ] = numpy.inf

β€”
Reply to this email directly or view it on GitHub
#61 (comment)
.

from prpy.

psigen avatar psigen commented on May 21, 2024

That's an interesting point, @sjavdani. This seems like a case where changing to the intuitive behavior in our OpenRAVE fork might be The Right Thingβ„’.

from prpy.

Related Issues (20)

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.