Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- pytest-repeat
- icub-models
- idyntree >=11.0.0
- jax
- jax<=0.6.0
- pytorch
- jax2torch
- requests
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ dependencies = [
]

[project.optional-dependencies]
jax = ["jax", "jaxlib"]
jax = ["jax<=0.6.0", "jaxlib"]
casadi = ["casadi"]
pytorch = ["torch", "jax", "jaxlib", "jax2torch"]
test = [
"jax",
"jax<=0.6.0",
"jaxlib",
"casadi",
"torch",
Expand Down
10 changes: 5 additions & 5 deletions src/adam/casadi/inverse_kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,13 +582,13 @@ def _check_target_type(self, frame: str, expected: TargetType):
def add_cost(self, cost: cs.MX):
"""Add a custom cost term to the optimization problem.

This method appends the provided cost term to the `cost_terms` list.
During the `_finalize_problem` step, all cost terms in this list are
combined using `cs.sum(cs.vertcat(*self.cost_terms))` and minimized
This method appends the provided cost term to the `cost_terms` list.
During the `_finalize_problem` step, all cost terms in this list are
combined using `cs.sum(cs.vertcat(*self.cost_terms))` and minimized
as part of the objective function.

Note: This method ensures that the optimization graph is still modifiable
before adding the cost term. Once the problem is finalized (after the
Note: This method ensures that the optimization graph is still modifiable
before adding the cost term. Once the problem is finalized (after the
first call to `solve()`), no new cost terms can be added.
Args:
cost (cs.MX): The cost term to add.
Expand Down
Loading