Comments (3)
Hi! That's a good question that I unfortunately don't have a direct answer to. You're right, the polynomial that's affecting the constraint changes as the duration get optimized. Therefore, you can't really know in advance which optimization variables affect this constraint, anyone of the polynomials might. See here the discrete id
being calculated:
Line 66 in e125b35
(Side note: only for the dynamic and range-of-motion constraint that are equally spaced in time. Many other constraints are directly enforced at the polynomial junctions, and move together as the durations change, so those should be easier to formulate symbolically).
So I'm not sure how you could implement this symbolically, but the function above that calculates this discrete ID would be the one to focus on. Maybe there's a way to say: All node values might affect the specific constraint at time t, just the affect of those nodes far away from the constraint are zero?
from towr.
Hi,
On the same subject, I think this problem already exists with IPOPT. According to my tests and the IPOPT documentation, the structure of the Jacobian needs to be constant [1] and IPOPT starts to give weird results when a constraint switches from one spline to the other.
@awinkler Do you initialize IPOPT with a specific structure somewhere? If not, I'd suggest to add non-zero values in the Jacobian for the n next/previous splines w.r.t the active one at least during the IPOPT initialization.
[1] "Once defined, this nonzero structure MUST remain constant for the entire optimization procedure. This means that the structure needs to include entries for any element that could ever be nonzero,
not only those that are nonzero at the starting point." https://projects.coin-or.org/Ipopt/browser/stable/3.2/Ipopt/doc/documentation.pdf?format=raw
from towr.
Yes, you're right, I just checked the code to find where I'm tackling this issue already. This is because IPOPT requires the sparsity structure beforehand, see this discussion. They way it's currently solved is very generously initializing all elements to be non-zero; so similar to what you suggested @Mathieu-Geisert. I'm assuming this makes it less performant, but at least won't mess up the algorithmic structure.
towr/towr/src/phase_durations.cc
Line 153 in e125b35
On a more general note, optimizing over the durations remains tricky. Convergence is slower from my experience and not as robust, so there's definitely room for investigation and discussion on how to set up this structure correctly.
from towr.
Related Issues (20)
- Get position and orientation data HOT 1
- CMake for other projects
- Advice on how to decrease unrealistic contact forces between spline nodes HOT 5
- how to increase leg lift height when swing phase? HOT 2
- Integrating existing height map(Grid map) with Towr HOT 3
- link for "Add your own robot" dead HOT 1
- derivative check with IPOPT HOT 1
- an Error
- add cool terrains/height-maps
- Phase duration optimization under a specified gait
- Broken link in readme file HOT 1
- nonlinear trajectory optimization for quadruped robot
- ROS noetic
- Calculate forces during standing HOT 1
- ROS 2 Foxy Release HOT 2
- Assertion failed
- Experiencing a strange behaviour HOT 1
- A small bug in HeightMap::GetDerivativeOfNormalizedBasisWrt()
- Optimization reporting infeasibility on simple terrains
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from towr.