DEV.co
AI Coding Agents · loco-3d

crocoddyl

Crocoddyl is an open-source C++ optimal control library designed for robot motion planning and trajectory optimization under contact sequences. It implements efficient Differential Dynamic Programming (DDP) algorithms and integrates with Pinocchio for fast dynamics computation, widely distributed via conda-forge, pip, and package managers.

Source: GitHub — github.com/loco-3d/crocoddyl
1.3k
GitHub stars
210
Forks
C++
Primary language
BSD-3-Clause
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryloco-3d/crocoddyl
Ownerloco-3d
Primary languageC++
LicenseBSD-3-Clause — OSI-approved
Stars1.3k
Forks210
Open issues19
Latest releasev3.2.1 (2026-05-10)
Last updated2026-06-30
Sourcehttps://github.com/loco-3d/crocoddyl

What crocoddyl is

A BSD-3-Clause C++11/14/17/20 library offering multiple solvers (FDDP, OdynSQP, Intro, Ipopt), sparse analytical derivatives via Pinocchio, OpenMP multi-threading, Python bindings via Boost.Python, and optional automatic differentiation through CppAD. Supports various integrators, cost functions, constraints, and code generation.

Quickstart

Get the crocoddyl source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/loco-3d/crocoddyl.gitcd crocoddyl# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Legged Robot Locomotion Planning

Crocoddyl is purpose-built for contact-rich optimal control; directly applicable to quadrupedal and bipedal gait generation, footstep planning, and dynamic maneuvers under contact constraints.

Model Predictive Control (MPC) Research & Development

Provides multiple DDP-variant solvers and supports rapid prototyping of trajectory optimization algorithms; well-suited for academic and industrial control research requiring analytical derivatives and performance tuning.

Real-Time Trajectory Optimization with ROS Integration

Native ROS support, Python/C++ bindings, and OpenMP parallelization enable integration into robot middleware stacks; suitable for on-device motion planning where latency and derivative accuracy matter.

Implementation considerations

  • Mandatory dependency chain: Pinocchio, Eigen, eigenpy, Boost must be pre-installed; on some platforms (e.g., embedded, Windows MSVC) builds may require troubleshooting.
  • Model definition is critical—contact frames, friction coefficients, and task costs must be accurately specified; errors here compound during trajectory optimization.
  • Python bindings enable rapid prototyping, but production closed-loop control typically requires compiled C++ for deterministic latency and memory footprint.
  • Optional dependencies (OpenMP, CppAD, Ipopt) unlock performance and code-generation features; evaluate trade-offs between build complexity and solver choice.
  • Requires familiarization with DDP theory and Pinocchio API; learning curve steeper than black-box solvers, but necessary to tune solver parameters and debug convergence.

When to avoid it — and what to weigh

  • Closed-Loop Vision-Based Manipulation Without Strong Dynamics Models — Crocoddyl requires high-fidelity robot models and contact geometry; unsuitable if you lack reliable dynamics, actuator models, or cannot commit to maintaining contact definitions.
  • Non-Robotics Optimization or Black-Box Function Optimization — Crocoddyl is specialized for robot trajectory optimization under contact; not a general-purpose optimizer for unconstrained or generic convex problems.
  • Production Systems Requiring Commercial Support & SLA — This is an academic research library with community-driven maintenance; lacks commercial backing, formal support channels, or documented SLAs typical of enterprise control solutions.
  • Extremely Resource-Constrained Embedded Platforms — Heavy C++ dependencies (Eigen, Boost, Pinocchio), multi-threading overhead, and analytical derivative computation may exceed flash/RAM budgets of microcontroller-class robots.

License & commercial use

BSD-3-Clause (Revised License). Permissive open-source license allowing commercial use, modification, and distribution; requires attribution and retention of license text. No patent grant or warranty.

BSD-3-Clause permits commercial use without royalty or license fee. However, ensure compliance with attribution requirements and review any embedded or modified derivatives separately. No express patent or liability protections; if patent risk is a concern, seek legal review. Note: No commercial support structure apparent from GitHub data; commercial deployment decisions should account for community-only maintenance.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

No explicit security audit, vulnerability disclosure policy, or hardening guidance in README. As an optimization library without network/auth exposure, direct security risks are low if dependencies are patched. However: dependency chain includes Boost, Eigen, CppAD, Ipopt—evaluate supply-chain risk in your threat model. For embedded or safety-critical robotics, conduct code review and fuzz-testing before deployment. No mention of signed releases or checksums.

Alternatives to consider

Pinocchio (Direct Dynamics Library)

Pinocchio is Crocoddyl's dependency for dynamics; if you only need fast rigid-body simulation without optimization, Pinocchio alone suffices. Lighter-weight but no trajectory solvers.

ACADO Toolkit

Academic toolkit for optimal control with MPC focus; supports automatic differentiation and code generation. Broader domain (not robotics-specific); less mature contact modeling but comparable feature set.

Trajopt / TrajOpt++ (Rethink Robotics / Carnegie Mellon)

Convex trajectory optimization for manipulation; stronger constraint handling for obstacle avoidance. Less focus on contact dynamics; better for non-legged systems with collision avoidance.

Software development agency

Build on crocoddyl with DEV.co software developers

Evaluate Crocoddyl for your trajectory planning needs. Start with conda install or pip, review PUBLICATIONS.md for solver details, and assess dependency chain for your platform. For production deployment or integration support, consult Devco's custom software engineering services.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

crocoddyl FAQ

Can I use Crocoddyl for real-time robot control?
Partial. Crocoddyl computes trajectories offline or in MPC receding-horizon fashion; computation time depends on horizon length, dynamics complexity, and solver choice (FDDP is faster than Ipopt). C++ compiled solvers with OpenMP can meet hard real-time for short horizons (<1s) on modern CPU; no hard guarantees. Python bindings introduce latency; avoid for sub-10ms loops.
How do I define contact constraints (friction, normal force)?
Crocoddyl uses task-cost abstractions and Pinocchio's contact frames. Contact models are defined via cost functions and constraint objects; documentation is sparse. Expect to read source code or academic papers to understand the API. ROS robotpkg packages may include examples.
Is Crocoddyl suitable for manipulation tasks?
Crocoddyl is optimized for legged locomotion under contact sequences. Manipulation is possible but not primary; it lacks manipulation-specific features like dual-arm coordination or object-centric cost terms. For pick-and-place, consider alternatives like TrajOpt or MoveIt2's planning plugins.
What are the differences between FDDP, OdynSQP, and Ipopt solvers?
Not detailed in provided README. FDDP (Fast DDP) is likely the default fast solver for smooth problems; OdynSQP and Ipopt are alternatives mentioned but not compared. Consult PUBLICATIONS.md and Doxygen API docs for algorithmic trade-offs.

Custom software development services

DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If crocoddyl is part of your ai coding agents roadmap, our team can implement, customize, migrate, and maintain it.

Ready to Optimize Robot Motion?

Evaluate Crocoddyl for your trajectory planning needs. Start with conda install or pip, review PUBLICATIONS.md for solver details, and assess dependency chain for your platform. For production deployment or integration support, consult Devco's custom software engineering services.