Giter Club home page Giter Club logo

Comments (3)

awinkler avatar awinkler commented on June 4, 2024 1

Good question. Exactly, this is also related to the way rviz shapes are being used to approximate the actual height map used by the optimizer. If you look at

h = a*x*x + b*x + c;

you see that for the optimizer the gap is modeled as a parabola. This parabola cannot be easily represented with rviz shapes, but the foothold you show is placed exactly on this parabola.

PS: You can also model the gap directly as the rviz picture, with non-continuous heights. This can work as well, however having the gradient information of the parabola available helps the solver converge quicker.

from towr.

awinkler avatar awinkler commented on June 4, 2024

Hi @ferrolho, yes, this looks good, i think the optimizer is doing exactly as it's supposed to and only the visualization in rviz is off.

The height map the optimizer user internally, with a width of 1m is encoded here:

const double w = 1.0; // gap width or 0.5 for ANYmal

The class that tries to replicate the internal height map with rviz shapes is faultily using only 0.5m and is coded here:

double l_gap = 0.5; // was 0.5m or 1m for biped for anymal motions

So for now just make sure these coincide and I'm actually working on how not to duplicate that information, but at the same time introduce no dependencies on rviz in the core solver class. I'll also fix this bug in that PR and update this issue then.

from towr.

ferrolho avatar ferrolho commented on June 4, 2024

Hey @awinkler, thank you for the prompt reply!

This was indeed an issue and after setting double l_gap = 1.0; result looks better:
gif

However, I am still a bit confused... This is the log of the optimiser I get on my slow laptop:

Number of Iterations....: 69

                                   (scaled)                 (unscaled)
Objective...............:   0.0000000000000000e+00    0.0000000000000000e+00
Dual infeasibility......:   7.9408063850289635e-06    7.9408063850289635e-06
Constraint violation....:   5.2894000180652583e-12    1.2967404927621828e-11
Complementarity.........:   1.8847416957485208e-06    1.8847416957485208e-06
Overall NLP error.......:   7.9408063850289635e-06    7.9408063850289635e-06


Number of objective function evaluations             = 225
Number of objective gradient evaluations             = 64
Number of equality constraint evaluations            = 225
Number of inequality constraint evaluations          = 225
Number of equality constraint Jacobian evaluations   = 71
Number of inequality constraint Jacobian evaluations = 71
Number of Lagrangian Hessian evaluations             = 0
Total CPU secs in IPOPT (w/o function evaluations)   =      1.221
Total CPU secs in NLP function evaluations           =     25.192

EXIT: Optimal Solution Found.

It says "Optimal Solution Found" and does not report any constraint to have been violated. However, in the animation above we can see that, at least visually, this does not seem to be the case:

Imgur

from towr.

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.