Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
15edea7
Merge pull request #58 from machines-in-motion/main
MaximilienNaveau Mar 23, 2025
9d45818
change readme crocoddyl dependency v2->v3
Jun 16, 2025
a05b31f
Merge pull request #63 from tkpf/cleanup/readme-version-update
MaximilienNaveau Aug 8, 2025
176db0e
Merge pull request #70 from machines-in-motion/main
MaximilienNaveau Oct 10, 2025
d668efc
sync submodule
nim65s Oct 6, 2025
796eecf
CMake: BUILD_STANDALONE_PYTHON_INTERFACE
nim65s Oct 6, 2025
7df5186
nix: BUILD_STANDALONE_PYTHON_INTERFACE
nim65s Oct 6, 2025
b2cc9d7
Merge pull request #71 from nim65s/standalone
MaximilienNaveau Oct 13, 2025
6aef70d
fixed osqp test
ajordana Nov 10, 2025
df76e60
Merge pull request #73 from machines-in-motion/ajordana_osqp_fix
nim65s Nov 13, 2025
c40aeb3
nix flake update
nim65s Oct 13, 2025
d215094
update package.xml
nim65s Oct 13, 2025
a03789a
ci: switch to osqp v1
nim65s Oct 13, 2025
63fda26
tests: assertTrue(a < b, c) -> assertLess(a, b, c)
nim65s Oct 13, 2025
2a04c2d
pre-commit run -a
nim65s Oct 13, 2025
b5d3d63
pre-commit autoupdate
nim65s Oct 13, 2025
598eb13
fix for crocoddyl v3.1.0 explicit template instanciation
nim65s Oct 14, 2025
4601696
tests: todo for crocoddyl >= 3.1.0
nim65s Nov 10, 2025
2fa30a0
nix: update
nim65s Nov 10, 2025
68f0a75
flake: sync with gepetto/nix template
nim65s Nov 10, 2025
0cfce62
ci: apply croco#1440
nim65s Nov 10, 2025
b265524
Merge pull request #72 from nim65s/osqp
nim65s Nov 13, 2025
0b03219
ci: ubuntu/mac x arm/intel
nim65s Nov 13, 2025
17722f1
nix flake update
nim65s Nov 17, 2025
64fd4a9
Merge pull request #74 from nim65s/arm
nim65s Nov 17, 2025
ea800bc
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 24, 2025
4e95e47
Merge pull request #75 from machines-in-motion/dependabot/github_acti…
nim65s Nov 24, 2025
ff6140a
flake.lock: Update
nim65s Dec 18, 2025
a2a40e8
add changelog entries
nim65s Dec 18, 2025
de6d43f
sync submodule
nim65s Dec 18, 2025
40badfe
pre-commit autoupdate
nim65s Dec 18, 2025
6bc390a
nix: standalone -> buildStandalone
nim65s Dec 18, 2025
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 .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "weekly"
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: 'true'
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install crocoddyl[build] proxsuite[build]
- run: echo "CMAKE_PREFIX_PATH=$(cmeel cmake)" >> $GITHUB_ENV
# TODO: remove this after the next crocoddyl release
# ref. https://github.com/loco-3d/crocoddyl/pull/1440
- run: sed -i '1i \#include <memory>' $CMAKE_PREFIX_PATH/include/crocoddyl/core/utils/conversions.hpp
- run: cmake -B build -S .
- run: cmake --build build -j 4

- run: python -m pip install "osqp<1.0.0"
- run: python -m pip install osqp
- run: echo "LD_LIBRARY_PATH=$(cmeel lib)" >> $GITHUB_ENV
- run: cmake --build build -t test
33 changes: 21 additions & 12 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
name: "CI - Nix"

on:
push:
branches:
- main
- devel
- devel
- master
- main
pull_request:
branches:
- main
- devel

- devel
- master
- main
jobs:
tests:
name: "Nix build on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}-latest"
nix:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu, macos]
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v16
with:
name: gepetto
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build -L
- run: nix flake check -L
check:
if: always()
name: check-macos-linux-nix
runs-on: ubuntu-latest
needs:
- nix
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
4 changes: 2 additions & 2 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@main
with:
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.5
rev: v0.14.9
hooks:
- id: ruff
args:
Expand All @@ -12,18 +12,18 @@ repos:
hooks:
- id: cmake-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.2
rev: v0.24.3
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
rev: v21.1.8
hooks:
- id: clang-format
args:
- --style=Google
exclude: '^.*\.ipynb$'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Releases are available on the [github repository](https://github.com/machines-in

## [Unreleased]

- update for crocoddy v3
- update for osqp v1
- remove python 3.8 support

## [0.1.1] - 2025-03-22

### Fixed
Expand Down Expand Up @@ -74,7 +78,7 @@ Releases are available on the [github repository](https://github.com/machines-in
- Added vectorization and malloc check options in CMakeLists
- Added Github CI

### Changed
### Changed

- Code optimization
- Now checking stopping criteria for QP every 25 iterations in SolverCSQP (as a result, it is now more efficient to use SolverSQP for unconstrained problems)
Expand Down
66 changes: 33 additions & 33 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.22)

# Project properties
set(PROJECT_NAMESPACE machines-in-motion)
Expand All @@ -16,7 +16,6 @@ set(CMAKE_VERBOSE_MAKEFILE True)
add_compile_options(--warn-no-conversion)

# Project options
option(BUILD_PYTHON_INTERFACE "Build the python binding" ON)
option(SUFFIX_SO_VERSION "Suffix library name with its version" ON)
option(BUILD_WITH_PROXSUITE "Build the ProxQP-based SQP solver" OFF)
option(BUILD_BENCHMARKS "Build the benchmarks" OFF)
Expand Down Expand Up @@ -47,14 +46,6 @@ else()
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
elseif(${CMAKE_VERSION} VERSION_LESS "3.14.0")
message(
FATAL_ERROR
"\nCan't find jrl-cmakemodules. Please either:\n"
" - use git submodule: 'git submodule update --init'\n"
" - or install https://github.com/jrl-umi3218/jrl-cmakemodules\n"
" - or upgrade your CMake version to >= 3.14 to allow automatic fetching\n"
)
else()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
Expand Down Expand Up @@ -129,25 +120,33 @@ if(BUILD_WITH_PROXSUITE)
list(APPEND ${PROJECT_NAME}_SOURCES src/csqp_proxqp.cpp)
endif(BUILD_WITH_PROXSUITE)

add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_include_directories(
${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

if(SUFFIX_SO_VERSION)
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
endif()
if(BUILD_STANDALONE_PYTHON_INTERFACE)
add_project_dependency(${PROJECT_NAME} REQUIRED CONFIG)
set(PROJECT_EXPORT_NO_TARGET ON)
else()
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
target_include_directories(
${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

if(SUFFIX_SO_VERSION)
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION
${PROJECT_VERSION})
endif()

# Main Executable
target_link_libraries(${PROJECT_NAME} crocoddyl::crocoddyl)
if(BUILD_WITH_PROXSUITE)
target_link_libraries(${PROJECT_NAME} proxsuite::proxsuite)
endif()
# Main Executable
target_link_libraries(${PROJECT_NAME} crocoddyl::crocoddyl)
if(BUILD_WITH_PROXSUITE)
target_link_libraries(${PROJECT_NAME} proxsuite::proxsuite)
endif()

if(UNIX)
get_relative_rpath(${CMAKE_INSTALL_LIBDIR} ${PROJECT_NAME}_INSTALL_RPATH)
set_target_properties(
${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${${PROJECT_NAME}_INSTALL_RPATH}")
if(UNIX)
get_relative_rpath(${CMAKE_INSTALL_LIBDIR} ${PROJECT_NAME}_INSTALL_RPATH)
set_target_properties(
${PROJECT_NAME} PROPERTIES INSTALL_RPATH
"${${PROJECT_NAME}_INSTALL_RPATH}")
endif()
endif()

# Python Bindings
Expand All @@ -161,13 +160,14 @@ if(BUILD_TESTING)
endif()

# Benchmarks
if(BUILD_BENCHMARKS)
if(BUILD_BENCHMARKS AND NOT BUILD_STANDALONE_PYTHON_INTERFACE)
add_subdirectory(benchmarks)
endif()

# Installation
install(
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES package.xml DESTINATION share/${PROJECT_NAME})
if(NOT BUILD_STANDALONE_PYTHON_INTERFACE)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Implementation of efficient numerical optimal control solvers.
In particular, the Sequential Quadratic Programming (SQP) solver described in [this paper](https://laas.hal.science/hal-04330251) solves nonlinear constrained OCPs efficiently by leveraging sparsity.

All the solvers are implemented based on the API of [Crocoddyl](https://github.com/loco-3d/crocoddyl/tree/devel) (v2).
All the solvers are implemented based on the API of [Crocoddyl](https://github.com/loco-3d/crocoddyl/tree/devel) (v3).
In other words, our solvers take as input a `crocoddyl.ShootingProblem`.

Examples on how to use the solvers can be found in the `examples` directory.
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ add_library(${PROJECT_NAME}_BENCHMARK_TOOLS SHARED
foreach(BENCHMARK_NAME ${${PROJECT_NAME}_BENCHMARK})
add_executable(${BENCHMARK_NAME} ${BENCHMARK_NAME}.cpp)
target_link_libraries(
${BENCHMARK_NAME} ${PROJECT_NAME} example-robot-data::example-robot-data
${PROJECT_NAME}_BENCHMARK_TOOLS)
${BENCHMARK_NAME} ${PROJECT_NAME}::${PROJECT_NAME}
example-robot-data::example-robot-data ${PROJECT_NAME}_BENCHMARK_TOOLS)
add_custom_target("benchmarks-cpp-${BENCHMARK_NAME}" ${BENCHMARK_NAME}
\${INPUT})
endforeach(BENCHMARK_NAME ${${PROJECT_NAME}_BENCHMARK})
3 changes: 2 additions & 1 deletion bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ if(BUILD_WITH_PROXSUITE)
endif(BUILD_WITH_PROXSUITE)

add_library(${PY_NAME} MODULE ${${PY_NAME}_SOURCES})
target_link_libraries(${PY_NAME} PUBLIC ${PROJECT_NAME} eigenpy::eigenpy)
target_link_libraries(${PY_NAME} PUBLIC ${PROJECT_NAME}::${PROJECT_NAME}
eigenpy::eigenpy)

set_target_properties(
${PY_NAME}
Expand Down
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 440 files
Loading
Loading