Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter method alternative to linesearch #108

Merged
merged 14 commits into from
Jan 18, 2024

Conversation

edantec
Copy link
Collaborator

@edantec edantec commented Jan 4, 2024

This PR:

  • Adds a pair filter option to manage step acceptance in place of linesearch
  • Provides a python example of a walking OCP on Talos.

Resolves #31

@ManifoldFR
Copy link
Member

Thanks ! I'll do some editing to this PR if you don't mind

@ManifoldFR ManifoldFR changed the title Topic/edantec filter Add filter method alternative to linesearch Jan 4, 2024
@edantec
Copy link
Collaborator Author

edantec commented Jan 5, 2024

In commit [a7dee9f] I point out a circular include of enums.hpp in solver-proxddp.hpp

@jcarpent
Copy link
Member

jcarpent commented Jan 5, 2024

In commit [a7dee9f] I point out a circular include of enums.hpp in solver-proxddp.hpp

It should not be a problem is there is the classic safe guard or the new pragma once.
Is it the case?

Copy link
Member

@ManifoldFR ManifoldFR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few comments

bindings/python/src/module.cpp Show resolved Hide resolved
include/aligator/solvers/proxddp/solver-proxddp.hpp Outdated Show resolved Hide resolved
include/aligator/solvers/proxddp/solver-proxddp.hpp Outdated Show resolved Hide resolved
examples/utils/__init__.py Outdated Show resolved Hide resolved
@ManifoldFR
Copy link
Member

ManifoldFR commented Jan 8, 2024

The CI - OSX/Linux via Conda build is failing because we're using the features for std::pair from the new eigenpy 3.2.0 and the conda recipe is still on the previous version of eigenpy. Switching to std::array<_, 2> also won't do it for the same reason

We can do three things:

  • upgrade the eigenpy requirement to 3.2.0 for the entire library (fine by me) and the conda recipe
  • replace std::pair<Scalar, Scalar> by a simple struct
  • manually expose the pair type (with an eigenpy::register_symbolic_link safeguard in case another library chooses to expose the same type)

The first two options seem like best practice to me.

@jorisv what do you think ?

@ManifoldFR
Copy link
Member

ManifoldFR commented Jan 8, 2024

By the way @edantec please add yourself as a contributor to the README 😃

@jcarpent
Copy link
Member

jcarpent commented Jan 8, 2024

The CI - OSX/Linux via Conda build is failing because we're using the features for std::pair from the new eigenpy 3.2.0 and the conda recipe is still on the previous version of eigenpy

A new version of Pinocchio with the latest eigenpy release is on its way (see conda-forge/pinocchio-feedstock#107).

@ManifoldFR
Copy link
Member

I ended up bumping the required eigenpy version to 3.2.0.

@jcarpent
Copy link
Member

@edantec What is the status of this PR?

@edantec
Copy link
Collaborator Author

edantec commented Jan 12, 2024

@edantec What is the status of this PR?

From my side it is clean and finished. We are waiting for Wilson and Joris to fix the CI and make relevant updates on proxsuite-nlp.

@ManifoldFR
Copy link
Member

New packages for proxsuite-nlp 0.3.2 (using eigenpy 3.2.0) got shipped, I'll trigger the CI jobs again.

@ManifoldFR
Copy link
Member

@edantec Please update the changelog

jcarpent
jcarpent previously approved these changes Jan 15, 2024
@edantec
Copy link
Collaborator Author

edantec commented Jan 16, 2024

There are two tests that randomly fail on macos and I have no idea why (probably memory leak somewhere).
First failing test in python/test_solver.py where a basic LQR solved with proxddp linesearch does not converge sometimes.
Second failing test in python/test_integrators.py where the finite differences of RK2 integrator are wrong (in forward explicit dynamics).

I managed to reproduce the results on a Macos system, but I struggle to find the causes as I'm not used to debug under Macos. Some help would be welcomed!

Copy link
Member

@ManifoldFR ManifoldFR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow, I never noticed this.

@edantec
Copy link
Collaborator Author

edantec commented Jan 17, 2024

The memory error on test_solver.py has been fixed. As for the memory error of test_integrators.py, I have no idea why but it seems to have disappeared according to Joris.

@ManifoldFR
Copy link
Member

The memory error on test_solver.py has been fixed. As for the memory error of test_integrators.py, I have no idea why but it seems to have disappeared according to Joris.

It's the magic of ChristmasC++

@ManifoldFR
Copy link
Member

Everything looks copacetic. Will make a PR later to upstream the filter methods into proxsuite-nlp and remove the exceptions.

@ManifoldFR ManifoldFR merged commit 2f67d88 into Simple-Robotics:devel Jan 18, 2024
18 checks passed
@ManifoldFR ManifoldFR mentioned this pull request Jan 23, 2024
@edantec edantec deleted the topic/edantec_filter branch January 23, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants