Skip to content

Clamp built-in predicted CoM height to positive vertical velocity#1050

Open
mickaelbegon wants to merge 1 commit into
pyomeca:masterfrom
mickaelbegon:codex/fix-predicted-com-height-positive-vz-3-4
Open

Clamp built-in predicted CoM height to positive vertical velocity#1050
mickaelbegon wants to merge 1 commit into
pyomeca:masterfrom
mickaelbegon:codex/fix-predicted-com-height-positive-vz-3-4

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • clamp the vertical CoM velocity to its positive part in MINIMIZE_PREDICTED_COM_HEIGHT
  • update the penalty test to cover the new behavior explicitly
  • document the built-in objective with max(CoM_dot[2], 0) in the README

Validation

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 MPLCONFIGDIR=/private/tmp/mplconfig_bioptim PYTHONPATH=/Users/mickaelbegon/Documents/Synchro_jump/bioptim_pr /Users/mickaelbegon/miniconda3/envs/synchro-jump/bin/python -m pytest /Users/mickaelbegon/Documents/Synchro_jump/bioptim_pr/tests/shard4/test_penalty.py -q -k predicted_com_height

This change is Reviewable

@mickaelbegon mickaelbegon force-pushed the codex/fix-predicted-com-height-positive-vz-3-4 branch from 51e03f0 to bc98712 Compare May 6, 2026 16:07
@pariterre

Copy link
Copy Markdown
Member

@mickaelbegon
I am not sure I understand the purpose of this. Why do we assume com cannot be below 0. At if the feet are not at zero? Maybe we could add a "floor_level" value?
Also, I feel using a square objective is much more stable and RAM efficient than clipping to 0 using an "casadi_if_else" statement

@pariterre pariterre force-pushed the codex/fix-predicted-com-height-positive-vz-3-4 branch from bc98712 to 8bf22fa Compare June 2, 2026 15:52
@mickaelbegon

Copy link
Copy Markdown
Contributor Author

in fact, we don't want the solver to use a negative CoM velocity. The previous form needs to come with a constraint of positive CoMDot... perhaps only add this information to the Readme

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.

2 participants