Giter Club home page Giter Club logo

Comments (5)

RobertoRoos avatar RobertoRoos commented on August 28, 2024 5

Small update. I strayed away from the Towr notation a little further by removing the splines. Instead, I tried the more basic direct collocation based on nodes and linear interpolation. In this notation no analytical acceleration is available, so instead I use trapezoidal integration between nodes to ensure valid dynamics.
dynamic_constraints

To my surprise the results are better:
monoped_direct_collocation
It is easier to converge to a valid solution and it is even capable of solving the torque cost. (However, the torque efficient solution looks stiff and awkward.)

I find it hard to explain why this would be more robust. My WIP hypothesis is that in this notation the dynamics constraints apply directly on the nodes, allowing better 'control' for the optimiser.

from towr.

awinkler avatar awinkler commented on August 28, 2024

Hi Roberto! I think this is very interesting direction to explore 👍

I'm suspecting there are some conflicting constraints at work here, which make it hard for the solver to find a solution. A few thoughts to debug this:

  • I would fix the step timings if you haven't already done so, not optimize over them.
  • start with one jump forward (stance, swing, stance)
  • Are the Cartesian endeffector states and forces still part of the optimization variables? Or are you now only optimizing over base state, joint angles and torques? I'm curious which constraints you used and how you formulated them if you don't have some variables available? A critical one might be the zero-endeffector-force-paramterization during swing phase. I'm not sure how you did this if you only have joint torques.
  • Are you supplying the Jacobians (derivatives) of all these constraints as well? These might be very hard to write out analytically in terms of the joint angles. If you have wrong jacobians, that will also hinder the solver to converge. So a good test would be to try the above using IFOPT without your analytical Jacobians, only automatically derived numerical ones (change a setting in IFOPT). This takes a lot longer, but might converge and thereby hint at a bug in your Jacobians.

Alright, that would be my plan of attack, and intuitively i would think a single jump forward for a one-legged hopper should converge. But again, haven't tried this before, so curious to see what comes out.

Best
Alex

from towr.

RobertoRoos avatar RobertoRoos commented on August 28, 2024

Hi Alex,

  • Step timing is already disabled. (I actually never had it enabled, because I missed you need to enable it explicitly :p)
  • I've tried only a single jump, the results are very similar to the gif in the first post. So the motion looks okay, but there is still the oscillation in the oscillation in the upper body.
  • I updated the first post to include an outline of the NLP. Because this only a monoped I can still explicitly include the end-effector position.
  • I am supplying the derivatives. They are determined numerically from MuJoCo, so that makes it easier. The IPOPT derivative checker finds no issues, so that seems good. Just tried the finite-difference Jacobian, and it seems to change little.

Thank you!

from towr.

awinkler avatar awinkler commented on August 28, 2024

Okey, thanks for clarifying the NLP layout and I see you already tried the above.

So you have some redundant variables you're optimizing over (joint torques vs foot forces & joint angles vs foot postion) and then linking those with additional constraints (WBD & Forward Kinematics/Inverse Kinamatics)? Because theoretically the solver would only need one of those variable sets and might have it easier to converge then. However, I understand the motivation for splitting it up, because it makes it easier formulating the Jacobian, so that makes sense.

from towr.

RobertoRoos avatar RobertoRoos commented on August 28, 2024

No I started with redundant coordinates, but that didn't work well so I reduced it what it is now.

The foot forces (3 values) and joint torques (2 values) are separate. MuJoCo does not actually do ground physics, we rely on the implicit force. Then there is the end-effector position (3 values) and joint positions (3 values).

This is a niche notation that only works for a single EE, so I figured it would make a good start.

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.