├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── doc.yaml │ └── ros-build-test.yml ├── .gitignore ├── LICENCE.txt ├── README.md ├── jenkins-pipeline ├── ocs2 ├── CMakeLists.txt └── package.xml ├── ocs2_core ├── CMakeLists.txt ├── cmake │ └── ocs2_cxx_flags.cmake ├── include │ └── ocs2_core │ │ ├── ComputationRequest.h │ │ ├── NumericTraits.h │ │ ├── PreComputation.h │ │ ├── Types.h │ │ ├── augmented_lagrangian │ │ ├── AugmentedLagrangian.h │ │ ├── StateAugmentedLagrangian.h │ │ ├── StateAugmentedLagrangianCollection.h │ │ ├── StateAugmentedLagrangianInterface.h │ │ ├── StateInputAugmentedLagrangian.h │ │ ├── StateInputAugmentedLagrangianCollection.h │ │ └── StateInputAugmentedLagrangianInterface.h │ │ ├── automatic_differentiation │ │ ├── CppAdInterface.h │ │ ├── CppAdSparsity.h │ │ ├── FiniteDifferenceMethods.h │ │ └── Types.h │ │ ├── constraint │ │ ├── ConstraintOrder.h │ │ ├── LinearStateConstraint.h │ │ ├── LinearStateInputConstraint.h │ │ ├── StateConstraint.h │ │ ├── StateConstraintCollection.h │ │ ├── StateConstraintCppAd.h │ │ ├── StateInputConstraint.h │ │ ├── StateInputConstraintCollection.h │ │ └── StateInputConstraintCppAd.h │ │ ├── control │ │ ├── ControllerAdjustmentBase.h │ │ ├── ControllerBase.h │ │ ├── ControllerType.h │ │ ├── FeedforwardController.h │ │ ├── LinearController.h │ │ └── StateBasedLinearController.h │ │ ├── cost │ │ ├── QuadraticStateCost.h │ │ ├── QuadraticStateInputCost.h │ │ ├── StateCost.h │ │ ├── StateCostCollection.h │ │ ├── StateCostCppAd.h │ │ ├── StateInputCost.h │ │ ├── StateInputCostCollection.h │ │ ├── StateInputCostCppAd.h │ │ └── StateInputGaussNewtonCostAd.h │ │ ├── dynamics │ │ ├── ControlledSystemBase.h │ │ ├── LinearSystemDynamics.h │ │ ├── SystemDynamicsBase.h │ │ ├── SystemDynamicsBaseAD.h │ │ ├── SystemDynamicsLinearizer.h │ │ └── TransferFunctionBase.h │ │ ├── initialization │ │ ├── DefaultInitializer.h │ │ ├── Initializer.h │ │ └── OperatingPoints.h │ │ ├── integration │ │ ├── Integrator.h │ │ ├── IntegratorBase.h │ │ ├── Observer.h │ │ ├── OdeBase.h │ │ ├── OdeFunc.h │ │ ├── RungeKuttaDormandPrince5.h │ │ ├── SensitivityIntegrator.h │ │ ├── SensitivityIntegratorImpl.h │ │ ├── StateTriggeredEventHandler.h │ │ ├── SystemEventHandler.h │ │ ├── TrapezoidalIntegration.h │ │ ├── eigenIntegration.h │ │ ├── implementation │ │ │ └── Integrator.h │ │ └── steppers.h │ │ ├── loopshaping │ │ ├── Loopshaping.h │ │ ├── LoopshapingDefinition.h │ │ ├── LoopshapingFilter.h │ │ ├── LoopshapingPreComputation.h │ │ ├── LoopshapingPropertyTree.h │ │ ├── augmented_lagrangian │ │ │ ├── LoopshapingAugmentedLagrangian.h │ │ │ ├── LoopshapingAugmentedLagrangianEliminatePattern.h │ │ │ ├── LoopshapingAugmentedLagrangianOutputPattern.h │ │ │ ├── LoopshapingStateAugmentedLagrangian.h │ │ │ └── LoopshapingStateInputAugmentedLagrangian.h │ │ ├── constraint │ │ │ ├── LoopshapingConstraint.h │ │ │ ├── LoopshapingConstraintEliminatePattern.h │ │ │ ├── LoopshapingConstraintOutputPattern.h │ │ │ ├── LoopshapingStateConstraint.h │ │ │ └── LoopshapingStateInputConstraint.h │ │ ├── cost │ │ │ ├── LoopshapingCost.h │ │ │ ├── LoopshapingCostEliminatePattern.h │ │ │ ├── LoopshapingCostOutputPattern.h │ │ │ ├── LoopshapingStateCost.h │ │ │ └── LoopshapingStateInputCost.h │ │ ├── dynamics │ │ │ ├── LoopshapingDynamics.h │ │ │ ├── LoopshapingDynamicsEliminatePattern.h │ │ │ ├── LoopshapingDynamicsOutputPattern.h │ │ │ └── LoopshapingFilterDynamics.h │ │ ├── initialization │ │ │ └── LoopshapingInitializer.h │ │ └── soft_constraint │ │ │ ├── LoopshapingSoftConstraint.h │ │ │ ├── LoopshapingSoftConstraintEliminatePattern.h │ │ │ ├── LoopshapingSoftConstraintOutputPattern.h │ │ │ └── LoopshapingStateInputSoftConstraint.h │ │ ├── misc │ │ ├── Benchmark.h │ │ ├── Collection.h │ │ ├── CommandLine.h │ │ ├── Display.h │ │ ├── LTI_Equations.h │ │ ├── LinearAlgebra.h │ │ ├── LinearFunction.h │ │ ├── LinearInterpolation.h │ │ ├── LoadData.h │ │ ├── LoadStdVectorOfPair.h │ │ ├── Log.h │ │ ├── Lookup.h │ │ ├── Numerics.h │ │ ├── implementation │ │ │ └── LinearInterpolation.h │ │ └── randomMatrices.h │ │ ├── model_data │ │ ├── Metrics.h │ │ ├── ModelData.h │ │ ├── ModelDataLinearInterpolation.h │ │ └── Multiplier.h │ │ ├── penalties │ │ ├── MultidimensionalPenalty.h │ │ ├── Penalties.h │ │ ├── augmented │ │ │ ├── AugmentedPenaltyBase.h │ │ │ ├── ModifiedRelaxedBarrierPenalty.h │ │ │ ├── QuadraticPenalty.h │ │ │ ├── SlacknessSquaredHingePenalty.h │ │ │ └── SmoothAbsolutePenalty.h │ │ └── penalties │ │ │ ├── DoubleSidedPenalty.h │ │ │ ├── PenaltyBase.h │ │ │ ├── QuadraticPenalty.h │ │ │ ├── RelaxedBarrierPenalty.h │ │ │ ├── SmoothAbsolutePenalty.h │ │ │ └── SquaredHingePenalty.h │ │ ├── reference │ │ ├── ModeSchedule.h │ │ └── TargetTrajectories.h │ │ ├── soft_constraint │ │ ├── StateInputSoftBoxConstraint.h │ │ ├── StateInputSoftConstraint.h │ │ └── StateSoftConstraint.h │ │ └── thread_support │ │ ├── BufferedValue.h │ │ ├── ExecuteAndSleep.h │ │ ├── SetThreadPriority.h │ │ ├── Synchronized.h │ │ └── ThreadPool.h ├── misc │ └── BugReportTest.cpp ├── package.xml ├── src │ ├── Types.cpp │ ├── augmented_lagrangian │ │ ├── AugmentedLagrangian.cpp │ │ ├── StateAugmentedLagrangian.cpp │ │ ├── StateAugmentedLagrangianCollection.cpp │ │ ├── StateInputAugmentedLagrangian.cpp │ │ └── StateInputAugmentedLagrangianCollection.cpp │ ├── automatic_differentation │ │ ├── CppAdInterface.cpp │ │ ├── CppAdSparsity.cpp │ │ └── FiniteDifferenceMethods.cpp │ ├── constraint │ │ ├── LinearStateConstraint.cpp │ │ ├── LinearStateInputConstraint.cpp │ │ ├── StateConstraintCollection.cpp │ │ ├── StateConstraintCppAd.cpp │ │ ├── StateInputConstraintCollection.cpp │ │ └── StateInputConstraintCppAd.cpp │ ├── control │ │ ├── FeedforwardController.cpp │ │ ├── LinearController.cpp │ │ └── StateBasedLinearController.cpp │ ├── cost │ │ ├── QuadraticStateCost.cpp │ │ ├── QuadraticStateInputCost.cpp │ │ ├── StateCostCollection.cpp │ │ ├── StateCostCppAd.cpp │ │ ├── StateInputCostCollection.cpp │ │ ├── StateInputCostCppAd.cpp │ │ └── StateInputGaussNewtonCostAd.cpp │ ├── dynamics │ │ ├── ControlledSystemBase.cpp │ │ ├── LinearSystemDynamics.cpp │ │ ├── SystemDynamicsBase.cpp │ │ ├── SystemDynamicsBaseAD.cpp │ │ ├── SystemDynamicsLinearizer.cpp │ │ └── TransferFunctionBase.cpp │ ├── integration │ │ ├── Integrator.cpp │ │ ├── IntegratorBase.cpp │ │ ├── Observer.cpp │ │ ├── OdeBase.cpp │ │ ├── RungeKuttaDormandPrince5.cpp │ │ ├── SensitivityIntegrator.cpp │ │ ├── SensitivityIntegratorImpl.cpp │ │ ├── StateTriggeredEventHandler.cpp │ │ └── SystemEventHandler.cpp │ ├── lintTarget.cpp │ ├── loopshaping │ │ ├── LoopshapingDefinition.cpp │ │ ├── LoopshapingFilter.cpp │ │ ├── LoopshapingPreComputation.cpp │ │ ├── LoopshapingPropertyTree.cpp │ │ ├── augmented_lagrangian │ │ │ ├── LoopshapingAugmentedLagrangian.cpp │ │ │ ├── LoopshapingAugmentedLagrangianEliminatePattern.cpp │ │ │ ├── LoopshapingAugmentedLagrangianOutputPattern.cpp │ │ │ ├── LoopshapingStateAugmentedLagrangian.cpp │ │ │ └── LoopshapingStateInputAugmentedLagrangian.cpp │ │ ├── constraint │ │ │ ├── LoopshapingConstraint.cpp │ │ │ ├── LoopshapingConstraintEliminatePattern.cpp │ │ │ ├── LoopshapingConstraintOutputPattern.cpp │ │ │ ├── LoopshapingStateConstraint.cpp │ │ │ └── LoopshapingStateInputConstraint.cpp │ │ ├── cost │ │ │ ├── LoopshapingCost.cpp │ │ │ ├── LoopshapingCostEliminatePattern.cpp │ │ │ ├── LoopshapingCostOutputPattern.cpp │ │ │ ├── LoopshapingStateCost.cpp │ │ │ └── LoopshapingStateInputCost.cpp │ │ ├── dynamics │ │ │ ├── LoopshapingDynamics.cpp │ │ │ ├── LoopshapingDynamicsEliminatePattern.cpp │ │ │ ├── LoopshapingDynamicsOutputPattern.cpp │ │ │ └── LoopshapingFilterDynamics.cpp │ │ ├── initialization │ │ │ └── LoopshapingInitializer.cpp │ │ └── soft_constraint │ │ │ ├── LoopshapingSoftConstraint.cpp │ │ │ ├── LoopshapingSoftConstraintEliminatePattern.cpp │ │ │ ├── LoopshapingSoftConstraintOutputPattern.cpp │ │ │ └── LoopshapingStateInputSoftConstraint.cpp │ ├── misc │ │ ├── LinearAlgebra.cpp │ │ └── Log.cpp │ ├── model_data │ │ ├── Metrics.cpp │ │ ├── ModelData.cpp │ │ └── Multiplier.cpp │ ├── penalties │ │ ├── MultidimensionalPenalty.cpp │ │ ├── Penalties.cpp │ │ └── penalties │ │ │ ├── RelaxedBarrierPenalty.cpp │ │ │ └── SquaredHingePenalty.cpp │ ├── reference │ │ ├── ModeSchedule.cpp │ │ └── TargetTrajectories.cpp │ ├── soft_constraint │ │ ├── StateInputSoftBoxConstraint.cpp │ │ ├── StateInputSoftConstraint.cpp │ │ └── StateSoftConstraint.cpp │ └── thread_support │ │ └── ThreadPool.cpp └── test │ ├── constraint │ ├── testConstraintCollection.cpp │ ├── testConstraintCppAd.cpp │ ├── testConstraints.h │ └── testLinearConstraint.cpp │ ├── control │ ├── testFeedforwardController.cpp │ └── testLinearController.cpp │ ├── cost │ ├── testCostCollection.cpp │ ├── testCostCppAd.cpp │ └── testQuadraticCostFunction.cpp │ ├── cppad_cg │ ├── LinearSystemDynamicsAD.h │ ├── commonFixture.h │ ├── testCppADCG_dynamics.cpp │ ├── testCppAdInterface.cpp │ └── testSparsityHelpers.cpp │ ├── dynamics │ ├── testSystemDynamicsLinearizer.cpp │ ├── testSystemDynamicsPreComputation.cpp │ └── testTransferfunctionBase.cpp │ ├── include │ └── ocs2_core │ │ └── test │ │ └── testTools.h │ ├── initialization │ └── InitializationTest.cpp │ ├── integration │ ├── IntegrationTest.cpp │ ├── TrapezoidalIntegrationTest.cpp │ ├── testRungeKuttaDormandPrince5.cpp │ └── testSensitivityIntegrator.cpp │ ├── loopshaping │ ├── loopshaping_r.conf │ ├── loopshaping_r_ballbot.conf │ ├── loopshaping_s.conf │ ├── loopshaping_s_integrator.conf │ ├── testLoopshapingAugmentedLagrangian.cpp │ ├── testLoopshapingAugmentedLagrangian.h │ ├── testLoopshapingConfiguration.cpp │ ├── testLoopshapingConfigurations.h │ ├── testLoopshapingConstraint.cpp │ ├── testLoopshapingConstraint.h │ ├── testLoopshapingCost.cpp │ ├── testLoopshapingCost.h │ ├── testLoopshapingDefinition.cpp │ ├── testLoopshapingDynamics.cpp │ ├── testLoopshapingDynamics.h │ ├── testLoopshapingFilterDynamics.cpp │ ├── testLoopshapingPreComputation.cpp │ ├── testLoopshapingSoftConstraint.cpp │ ├── testLoopshapingSoftConstraint.h │ └── testQuadraticConstraint.h │ ├── misc │ ├── data │ │ └── pairVectors.info │ ├── testInterpolation.cpp │ ├── testLinearAlgebra.cpp │ ├── testLoadData.cpp │ ├── testLogging.cpp │ └── testLookup.cpp │ ├── model_data │ ├── testMetrics.cpp │ ├── testModelData.cpp │ └── testMultiplier.cpp │ ├── reference │ └── testModeSchedule.cpp │ ├── soft_constraint │ ├── testDoubleSidedPenalty.cpp │ └── testSoftConstraint.cpp │ ├── testPrecomputation.cpp │ ├── testTypes.cpp │ └── thread_support │ ├── testBufferedValue.cpp │ ├── testSynchronized.cpp │ └── testThreadPool.cpp ├── ocs2_ddp ├── CMakeLists.txt ├── include │ └── ocs2_ddp │ │ ├── ContinuousTimeLqr.h │ │ ├── DDP_Data.h │ │ ├── DDP_DataCollector.h │ │ ├── DDP_HelperFunctions.h │ │ ├── DDP_Settings.h │ │ ├── GaussNewtonDDP.h │ │ ├── GaussNewtonDDP_MPC.h │ │ ├── HessianCorrection.h │ │ ├── ILQR.h │ │ ├── SLQ.h │ │ ├── riccati_equations │ │ ├── ContinuousTimeRiccatiEquations.h │ │ ├── DiscreteTimeRiccatiEquations.h │ │ ├── RiccatiModification.h │ │ ├── RiccatiModificationInterpolation.h │ │ └── RiccatiTransversalityConditions.h │ │ ├── search_strategy │ │ ├── LevenbergMarquardtStrategy.h │ │ ├── LineSearchStrategy.h │ │ ├── SearchStrategyBase.h │ │ └── StrategySettings.h │ │ └── unsupported │ │ ├── MPC_OCS2.h │ │ ├── SLQ_Hamiltonian.h │ │ ├── bvp_solver │ │ ├── BVPEquations.h │ │ └── SolveBVP.h │ │ └── implementation │ │ └── SLQ_Hamiltonian.h ├── package.xml ├── src │ ├── ContinuousTimeLqr.cpp │ ├── DDP_DataCollector.cpp │ ├── DDP_HelperFunctions.cpp │ ├── DDP_Settings.cpp │ ├── GaussNewtonDDP.cpp │ ├── HessianCorrection.cpp │ ├── ILQR.cpp │ ├── SLQ.cpp │ ├── lintTarget.cpp │ ├── riccati_equations │ │ ├── ContinuousTimeRiccatiEquations.cpp │ │ ├── DiscreteTimeRiccatiEquations.cpp │ │ └── RiccatiModification.cpp │ ├── search_strategy │ │ ├── LevenbergMarquardtStrategy.cpp │ │ ├── LineSearchStrategy.cpp │ │ └── StrategySettings.cpp │ └── unsupported │ │ └── MPC_OCS2.cpp └── test │ ├── CircularKinematicsTest.cpp │ ├── CorrectnessTest.cpp │ ├── Exp0Test.cpp │ ├── Exp1Test.cpp │ ├── HybridSlqTest.cpp │ ├── RiccatiTest.cpp │ ├── bouncingmass │ ├── BouncingMassTest.cpp │ ├── OverallReference.cpp │ └── Reference.cpp │ ├── include │ └── ocs2_ddp │ │ └── test │ │ └── bouncingmass │ │ ├── OverallReference.h │ │ ├── Reference.h │ │ └── SystemModel.h │ ├── testContinuousTimeLqr.cpp │ ├── testDdpHelperFunction.cpp │ └── testReachingTask.cpp ├── ocs2_doc ├── .gitignore ├── CMakeLists.txt ├── Dockerfile ├── cmake │ └── FindSphinx.cmake ├── docs │ ├── faq.rst │ ├── from_urdf_to_ocp.rst │ ├── getting-started.rst │ ├── index.rst │ ├── installation.rst │ ├── intro.rst │ ├── mpcnet.rst │ ├── optimal_control_modules.rst │ ├── overview.rst │ ├── profiling.rst │ ├── refs.bib │ └── robotic_examples.rst ├── package.xml ├── readme.md └── tools │ ├── doxygen │ ├── .gitignore │ └── Doxyfile.in │ └── sphinx │ ├── _static │ ├── cite.bib │ ├── gif │ │ ├── ballbot.gif │ │ ├── cartpole.gif │ │ ├── double_integrator.gif │ │ ├── legged_robot.gif │ │ ├── mobile_manipulator.gif │ │ ├── mobile_manipulator │ │ │ ├── franka.gif │ │ │ ├── kinova_j2n6.gif │ │ │ ├── kinova_j2n7.gif │ │ │ ├── mabi_mobile.gif │ │ │ ├── pr2.gif │ │ │ └── ridgeback_ur5.gif │ │ └── quadrotor.gif │ └── img │ │ ├── GitHub-Mark-120px-plus.png │ │ ├── jumping_goat.jpg │ │ └── logo.png │ └── conf.py ├── ocs2_frank_wolfe ├── CMakeLists.txt ├── cmake │ └── FindGLPK.cmake ├── include │ └── ocs2_frank_wolfe │ │ ├── FrankWolfeDescentDirection.h │ │ ├── GradientDescent.h │ │ ├── NLP_Constraints.h │ │ ├── NLP_Cost.h │ │ └── NLP_Settings.h ├── package.xml ├── src │ ├── FrankWolfeDescentDirection.cpp │ └── GradientDescent.cpp └── test │ ├── MatyasTest.cpp │ ├── QuadraticTest.cpp │ └── testGLPK.cpp ├── ocs2_ipm ├── CMakeLists.txt ├── include │ └── ocs2_ipm │ │ ├── IpmHelpers.h │ │ ├── IpmInitialization.h │ │ ├── IpmMpc.h │ │ ├── IpmPerformanceIndexComputation.h │ │ ├── IpmSettings.h │ │ ├── IpmSolver.h │ │ └── IpmSolverStatus.h ├── package.xml ├── src │ ├── IpmHelpers.cpp │ ├── IpmInitialization.cpp │ ├── IpmPerformanceIndexComputation.cpp │ ├── IpmSettings.cpp │ └── IpmSolver.cpp └── test │ ├── Exp0Test.cpp │ ├── Exp1Test.cpp │ ├── testCircularKinematics.cpp │ ├── testSwitchedProblem.cpp │ ├── testUnconstrained.cpp │ └── testValuefunction.cpp ├── ocs2_mpc ├── CMakeLists.txt ├── include │ └── ocs2_mpc │ │ ├── CommandData.h │ │ ├── LoopshapingSystemObservation.h │ │ ├── MPC_BASE.h │ │ ├── MPC_MRT_Interface.h │ │ ├── MPC_Settings.h │ │ ├── MRT_BASE.h │ │ ├── MrtObserver.h │ │ └── SystemObservation.h ├── package.xml └── src │ ├── LoopshapingSystemObservation.cpp │ ├── MPC_BASE.cpp │ ├── MPC_MRT_Interface.cpp │ ├── MPC_Settings.cpp │ ├── MRT_BASE.cpp │ ├── SystemObservation.cpp │ └── lintTarget.cpp ├── ocs2_mpcnet ├── ocs2_ballbot_mpcnet │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_ballbot_mpcnet │ │ │ ├── BallbotMpcnetDefinition.h │ │ │ └── BallbotMpcnetInterface.h │ ├── launch │ │ └── ballbot_mpcnet.launch │ ├── package.xml │ ├── policy │ │ ├── ballbot.onnx │ │ └── ballbot.pt │ ├── python │ │ └── ocs2_ballbot_mpcnet │ │ │ ├── __init__.py │ │ │ ├── config │ │ │ └── ballbot.yaml │ │ │ ├── mpcnet.py │ │ │ └── train.py │ ├── setup.py │ └── src │ │ ├── BallbotMpcnetDefinition.cpp │ │ ├── BallbotMpcnetDummyNode.cpp │ │ ├── BallbotMpcnetInterface.cpp │ │ └── BallbotMpcnetPybindings.cpp ├── ocs2_legged_robot_mpcnet │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_legged_robot_mpcnet │ │ │ ├── LeggedRobotMpcnetDefinition.h │ │ │ └── LeggedRobotMpcnetInterface.h │ ├── launch │ │ └── legged_robot_mpcnet.launch │ ├── package.xml │ ├── policy │ │ ├── legged_robot.onnx │ │ └── legged_robot.pt │ ├── python │ │ └── ocs2_legged_robot_mpcnet │ │ │ ├── __init__.py │ │ │ ├── config │ │ │ └── legged_robot.yaml │ │ │ ├── mpcnet.py │ │ │ └── train.py │ ├── setup.py │ └── src │ │ ├── LeggedRobotMpcnetDefinition.cpp │ │ ├── LeggedRobotMpcnetDummyNode.cpp │ │ ├── LeggedRobotMpcnetInterface.cpp │ │ └── LeggedRobotMpcnetPybindings.cpp ├── ocs2_mpcnet │ ├── CMakeLists.txt │ └── package.xml └── ocs2_mpcnet_core │ ├── CMakeLists.txt │ ├── include │ └── ocs2_mpcnet_core │ │ ├── MpcnetDefinitionBase.h │ │ ├── MpcnetInterfaceBase.h │ │ ├── MpcnetPybindMacros.h │ │ ├── control │ │ ├── MpcnetBehavioralController.h │ │ ├── MpcnetControllerBase.h │ │ └── MpcnetOnnxController.h │ │ ├── dummy │ │ ├── MpcnetDummyLoopRos.h │ │ └── MpcnetDummyObserverRos.h │ │ └── rollout │ │ ├── MpcnetData.h │ │ ├── MpcnetDataGeneration.h │ │ ├── MpcnetMetrics.h │ │ ├── MpcnetPolicyEvaluation.h │ │ ├── MpcnetRolloutBase.h │ │ └── MpcnetRolloutManager.h │ ├── misc │ └── onnxruntime │ │ └── cmake │ │ ├── onnxruntimeConfig.cmake │ │ └── onnxruntimeVersion.cmake │ ├── package.xml │ ├── python │ └── ocs2_mpcnet_core │ │ ├── __init__.py │ │ ├── config.py │ │ ├── helper.py │ │ ├── loss │ │ ├── __init__.py │ │ ├── base.py │ │ ├── behavioral_cloning.py │ │ ├── cross_entropy.py │ │ └── hamiltonian.py │ │ ├── memory │ │ ├── __init__.py │ │ ├── base.py │ │ └── circular.py │ │ ├── mpcnet.py │ │ └── policy │ │ ├── __init__.py │ │ ├── base.py │ │ ├── linear.py │ │ ├── mixture_of_linear_experts.py │ │ ├── mixture_of_nonlinear_experts.py │ │ └── nonlinear.py │ ├── requirements.txt │ ├── setup.py │ └── src │ ├── MpcnetInterfaceBase.cpp │ ├── MpcnetPybindings.cpp │ ├── control │ ├── MpcnetBehavioralController.cpp │ └── MpcnetOnnxController.cpp │ ├── dummy │ ├── MpcnetDummyLoopRos.cpp │ └── MpcnetDummyObserverRos.cpp │ └── rollout │ ├── MpcnetDataGeneration.cpp │ ├── MpcnetPolicyEvaluation.cpp │ ├── MpcnetRolloutBase.cpp │ └── MpcnetRolloutManager.cpp ├── ocs2_msgs ├── CMakeLists.txt ├── msg │ ├── constraint.msg │ ├── controller_data.msg │ ├── lagrangian_metrics.msg │ ├── mode_schedule.msg │ ├── mpc_flattened_controller.msg │ ├── mpc_input.msg │ ├── mpc_observation.msg │ ├── mpc_performance_indices.msg │ ├── mpc_state.msg │ ├── mpc_target_trajectories.msg │ └── multiplier.msg ├── package.xml └── srv │ └── reset.srv ├── ocs2_oc ├── CMakeLists.txt ├── include │ └── ocs2_oc │ │ ├── approximate_model │ │ ├── ChangeOfInputVariables.h │ │ └── LinearQuadraticApproximator.h │ │ ├── multiple_shooting │ │ ├── Helpers.h │ │ ├── Initialization.h │ │ ├── LagrangianEvaluation.h │ │ ├── MetricsComputation.h │ │ ├── PerformanceIndexComputation.h │ │ ├── ProjectionMultiplierCoefficients.h │ │ └── Transcription.h │ │ ├── oc_data │ │ ├── DualSolution.h │ │ ├── LoopshapingPrimalSolution.h │ │ ├── PerformanceIndex.h │ │ ├── PrimalSolution.h │ │ ├── ProblemMetrics.h │ │ └── TimeDiscretization.h │ │ ├── oc_problem │ │ ├── LoopshapingOptimalControlProblem.h │ │ ├── OcpSize.h │ │ ├── OcpToKkt.h │ │ ├── OptimalControlProblem.h │ │ └── OptimalControlProblemHelperFunction.h │ │ ├── oc_solver │ │ └── SolverBase.h │ │ ├── precondition │ │ └── Ruzi.h │ │ ├── rollout │ │ ├── InitializerRollout.h │ │ ├── PerformanceIndicesRollout.h │ │ ├── RolloutBase.h │ │ ├── RolloutSettings.h │ │ ├── RootFinder.h │ │ ├── RootFinderType.h │ │ ├── StateTriggeredRollout.h │ │ └── TimeTriggeredRollout.h │ │ ├── search_strategy │ │ └── FilterLinesearch.h │ │ ├── synchronized_module │ │ ├── LoopshapingReferenceManager.h │ │ ├── LoopshapingSynchronizedModule.h │ │ ├── ReferenceManager.h │ │ ├── ReferenceManagerDecorator.h │ │ ├── ReferenceManagerInterface.h │ │ ├── SolverObserver.h │ │ └── SolverSynchronizedModule.h │ │ └── trajectory_adjustment │ │ ├── TrajectorySpreading.h │ │ └── TrajectorySpreadingHelperFunctions.h ├── package.xml ├── src │ ├── approximate_model │ │ ├── ChangeOfInputVariables.cpp │ │ └── LinearQuadraticApproximator.cpp │ ├── lintTarget.cpp │ ├── multiple_shooting │ │ ├── Helpers.cpp │ │ ├── Initialization.cpp │ │ ├── LagrangianEvaluation.cpp │ │ ├── MetricsComputation.cpp │ │ ├── PerformanceIndexComputation.cpp │ │ ├── ProjectionMultiplierCoefficients.cpp │ │ └── Transcription.cpp │ ├── oc_data │ │ ├── LoopshapingPrimalSolution.cpp │ │ ├── PerformanceIndex.cpp │ │ └── TimeDiscretization.cpp │ ├── oc_problem │ │ ├── LoopshapingOptimalControlProblem.cpp │ │ ├── OcpSize.cpp │ │ ├── OcpToKkt.cpp │ │ ├── OptimalControlProblem.cpp │ │ └── OptimalControlProblemHelperFunction.cpp │ ├── oc_solver │ │ └── SolverBase.cpp │ ├── precondition │ │ └── Ruzi.cpp │ ├── rollout │ │ ├── InitializerRollout.cpp │ │ ├── PerformanceIndicesRollout.cpp │ │ ├── RolloutBase.cpp │ │ ├── RolloutSettings.cpp │ │ ├── RootFinder.cpp │ │ ├── StateTriggeredRollout.cpp │ │ └── TimeTriggeredRollout.cpp │ ├── search_strategy │ │ └── FilterLinesearch.cpp │ ├── synchronized_module │ │ ├── LoopshapingReferenceManager.cpp │ │ ├── LoopshapingSynchronizedModule.cpp │ │ ├── ReferenceManager.cpp │ │ └── SolverObserver.cpp │ └── trajectory_adjustment │ │ └── TrajectorySpreading.cpp └── test │ ├── include │ └── ocs2_oc │ │ └── test │ │ ├── DoubleIntegratorReachingTask.h │ │ ├── EXP0.h │ │ ├── EXP1.h │ │ ├── ball_dynamics_staterollout.h │ │ ├── circular_kinematics.h │ │ ├── dynamics_hybrid_slq_test.h │ │ ├── pendulum_dynamics_staterollout.h │ │ └── testProblemsGeneration.h │ ├── multiple_shooting │ ├── testProjectionMultiplierCoefficients.cpp │ ├── testTranscriptionMetrics.cpp │ └── testTranscriptionPerformanceIndex.cpp │ ├── oc_data │ └── testTimeDiscretization.cpp │ ├── oc_problem │ └── testOcpToKkt.cpp │ ├── precondition │ └── testPrecondition.cpp │ ├── rollout │ ├── testStateTriggeredRollout.cpp │ └── testTimeTriggeredRollout.cpp │ ├── testChangeOfInputVariables.cpp │ └── trajectory_adjustment │ └── TrajectorySpreadingTest.cpp ├── ocs2_ocs2 ├── CMakeLists.txt ├── include │ └── ocs2_ocs2 │ │ ├── FrankWolfeGDDP.h │ │ ├── GDDP.h │ │ ├── GDDP_Settings.h │ │ ├── GSLQPSolver.h │ │ ├── NumGDDP.h │ │ ├── OCS2.h │ │ ├── implementation │ │ ├── FrankWolfeGDDP.h │ │ ├── GDDP.h │ │ ├── GSLQSolver.h │ │ ├── NumGDDP.h │ │ └── OCS2.h │ │ ├── sensitivity_equations │ │ ├── BvpSensitivityEquations.h │ │ ├── BvpSensitivityErrorEquations.h │ │ ├── RolloutSensitivityEquations.h │ │ └── SensitivitySequentialRiccatiEquations.h │ │ └── upper_level_op │ │ ├── UpperLevelConstraints.h │ │ └── UpperLevelCost.h ├── package.xml ├── src │ └── lintTarget.cpp └── test │ ├── exp0_gddp_test.cpp │ ├── exp0_ocs2_test.cpp │ ├── exp1_gddp_test.cpp │ └── exp1_ocs2_test.cpp ├── ocs2_perceptive ├── CMakeLists.txt ├── include │ └── ocs2_perceptive │ │ ├── distance_transform │ │ ├── ComputeDistanceTransform.h │ │ ├── DistanceTransformInterface.h │ │ └── implementation │ │ │ └── ComputeDistanceTransform.h │ │ ├── end_effector │ │ ├── EndEffectorDistanceConstraint.h │ │ └── EndEffectorDistanceConstraintCppAd.h │ │ └── interpolation │ │ ├── BilinearInterpolation.h │ │ ├── TrilinearInterpolation.h │ │ └── implementation │ │ ├── BilinearInterpolation.h │ │ └── TrilinearInterpolation.h ├── package.xml ├── src │ ├── end_effector │ │ ├── EndEffectorDistanceConstraint.cpp │ │ └── EndEffectorDistanceConstraintCppAd.cpp │ └── lintTarget.cpp └── test │ └── interpolation │ ├── testBilinearInterpolation.cpp │ └── testTrilinearInterpolation.cpp ├── ocs2_pinocchio ├── ocs2_centroidal_model │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_centroidal_model │ │ │ ├── AccessHelperFunctions.h │ │ │ ├── CentroidalModelInfo.h │ │ │ ├── CentroidalModelPinocchioMapping.h │ │ │ ├── CentroidalModelRbdConversions.h │ │ │ ├── FactoryFunctions.h │ │ │ ├── ModelHelperFunctions.h │ │ │ ├── PinocchioCentroidalDynamics.h │ │ │ ├── PinocchioCentroidalDynamicsAD.h │ │ │ └── implementation │ │ │ ├── AccessHelperFunctionsImpl.h │ │ │ └── ModelHelperFunctionsImpl.h │ ├── package.xml │ ├── src │ │ ├── CentroidalModelInfo.cpp │ │ ├── CentroidalModelPinocchioMapping.cpp │ │ ├── CentroidalModelRbdConversions.cpp │ │ ├── FactoryFunctions.cpp │ │ ├── ModelHelperFunctions.cpp │ │ ├── PinocchioCentroidalDynamics.cpp │ │ └── PinocchioCentroidalDynamicsAD.cpp │ └── test │ │ ├── cppad_generated │ │ └── .gitignore │ │ ├── include │ │ └── ocs2_centroidal_model │ │ │ └── test │ │ │ └── definitions.h │ │ └── testAnymalCentroidalModel.cpp ├── ocs2_pinocchio │ ├── CMakeLists.txt │ └── package.xml ├── ocs2_pinocchio_interface │ ├── CMakeLists.txt │ ├── cmake │ │ └── pinocchio_config.cmake │ ├── include │ │ └── ocs2_pinocchio_interface │ │ │ ├── PinocchioEndEffectorKinematics.h │ │ │ ├── PinocchioEndEffectorKinematicsCppAd.h │ │ │ ├── PinocchioInterface.h │ │ │ ├── PinocchioStateInputMapping.h │ │ │ ├── implementation │ │ │ └── PinocchioInterface.h │ │ │ ├── pinocchio_forward_declaration.h │ │ │ └── urdf.h │ ├── package.xml │ ├── src │ │ ├── PinocchioEndEffectorKinematics.cpp │ │ ├── PinocchioEndEffectorKinematicsCppAd.cpp │ │ ├── PinocchioInterface.cpp │ │ ├── PinocchioInterfaceCppAd.cpp │ │ └── urdf.cpp │ └── test │ │ ├── CartPoleUrdf.h │ │ ├── ManipulatorArmUrdf.h │ │ ├── testPinocchioEndEffectorKinematics.cpp │ │ └── testPinocchioInterface.cpp ├── ocs2_self_collision │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_self_collision │ │ │ ├── PinocchioGeometryInterface.h │ │ │ ├── SelfCollision.h │ │ │ ├── SelfCollisionConstraint.h │ │ │ ├── SelfCollisionConstraintCppAd.h │ │ │ └── SelfCollisionCppAd.h │ ├── package.xml │ └── src │ │ ├── PinocchioGeometryInterface.cpp │ │ ├── SelfCollision.cpp │ │ ├── SelfCollisionConstraint.cpp │ │ ├── SelfCollisionConstraintCppAd.cpp │ │ └── SelfCollisionCppAd.cpp ├── ocs2_self_collision_visualization │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_self_collision_visualization │ │ │ └── GeometryInterfaceVisualization.h │ ├── package.xml │ └── src │ │ └── GeometryInterfaceVisualization.cpp └── ocs2_sphere_approximation │ ├── CMakeLists.txt │ ├── include │ └── ocs2_sphere_approximation │ │ ├── PinocchioSphereInterface.h │ │ ├── PinocchioSphereKinematics.h │ │ ├── PinocchioSphereKinematicsCppAd.h │ │ └── SphereApproximation.h │ ├── package.xml │ ├── src │ ├── PinocchioSphereInterface.cpp │ ├── PinocchioSphereKinematics.cpp │ ├── PinocchioSphereKinematicsCppAd.cpp │ └── SphereApproximation.cpp │ └── test │ └── testPinocchioSphereKinematics.cpp ├── ocs2_python_interface ├── CMakeLists.txt ├── include │ └── ocs2_python_interface │ │ ├── PybindMacros.h │ │ └── PythonInterface.h ├── package.xml ├── setup.py ├── src │ └── PythonInterface.cpp └── test │ └── testDummyPyBindings.cpp ├── ocs2_raisim ├── ocs2_legged_robot_raisim │ ├── CMakeLists.txt │ ├── config │ │ └── raisim.info │ ├── include │ │ └── ocs2_legged_robot_raisim │ │ │ ├── LeggedRobotRaisimConversions.h │ │ │ └── LeggedRobotRaisimVisualizer.h │ ├── launch │ │ ├── legged_robot_ddp_raisim.launch │ │ └── legged_robot_sqp_raisim.launch │ ├── package.xml │ ├── src │ │ ├── LeggedRobotRaisimConversions.cpp │ │ ├── LeggedRobotRaisimDummyNode.cpp │ │ └── LeggedRobotRaisimVisualizer.cpp │ └── test │ │ └── testLeggedRobotRaisimConversions.cpp ├── ocs2_raisim │ ├── CMakeLists.txt │ └── package.xml ├── ocs2_raisim_core │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_raisim_core │ │ │ ├── RaisimRollout.h │ │ │ └── RaisimRolloutSettings.h │ ├── package.xml │ └── src │ │ ├── RaisimRollout.cpp │ │ └── lintTarget.cpp └── ocs2_raisim_ros │ ├── CMakeLists.txt │ ├── include │ └── ocs2_raisim_ros │ │ └── RaisimHeightmapRosConverter.h │ ├── package.xml │ ├── src │ └── RaisimHeightmapRosConverter.cpp │ └── test │ └── testRosConversion.cpp ├── ocs2_robotic_examples ├── ocs2_ballbot │ ├── CMakeLists.txt │ ├── auto_generated │ │ └── .gitignore │ ├── config │ │ └── mpc │ │ │ └── task.info │ ├── include │ │ └── ocs2_ballbot │ │ │ ├── BallbotInterface.h │ │ │ ├── BallbotParameters.h │ │ │ ├── BallbotPyBindings.h │ │ │ ├── definitions.h │ │ │ ├── dynamics │ │ │ └── BallbotSystemDynamics.h │ │ │ ├── generated │ │ │ ├── declarations.h │ │ │ ├── default_dynparams_getter.h │ │ │ ├── dynamics_parameters.h │ │ │ ├── forward_dynamics.h │ │ │ ├── forward_dynamics.impl.h │ │ │ ├── inertia_properties.h │ │ │ ├── inertia_properties.impl.h │ │ │ ├── inverse_dynamics.h │ │ │ ├── inverse_dynamics.impl.h │ │ │ ├── jacobians.h │ │ │ ├── jacobians.impl.h │ │ │ ├── joint_data_map.h │ │ │ ├── jsim.h │ │ │ ├── jsim.impl.h │ │ │ ├── kindsl │ │ │ │ ├── Ballbot.dtdsl │ │ │ │ ├── Ballbot.kindsl │ │ │ │ └── ballbot.urdf │ │ │ ├── kinematics_parameters.h │ │ │ ├── link_data_map.h │ │ │ ├── miscellaneous.cpp │ │ │ ├── miscellaneous.h │ │ │ ├── traits.h │ │ │ ├── transforms.h │ │ │ └── transforms.impl.h │ │ │ └── package_path.h.in │ ├── package.xml │ ├── setup.py │ ├── src │ │ ├── BallbotInterface.cpp │ │ ├── BallbotSimpleExample.cpp │ │ ├── dynamics │ │ │ └── BallbotSystemDynamics.cpp │ │ ├── ocs2_ballbot │ │ │ └── __init__.py │ │ └── pyBindModule.cpp │ └── test │ │ ├── testBallbotPyBindings.cpp │ │ ├── testBallbotPyBindings.py │ │ └── testRobcogenModel.cpp ├── ocs2_ballbot_ros │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_ballbot_ros │ │ │ └── BallbotDummyVisualization.h │ ├── launch │ │ ├── ballbot_ddp.launch │ │ ├── ballbot_mpc_mrt.launch │ │ ├── ballbot_slp.launch │ │ ├── ballbot_sqp.launch │ │ ├── multiplot.launch │ │ └── visualize.launch │ ├── package.xml │ ├── rviz │ │ └── ballbot.rviz │ ├── src │ │ ├── BallbotDdpMpcNode.cpp │ │ ├── BallbotDummyVisualization.cpp │ │ ├── BallbotMpcMrtNode.cpp │ │ ├── BallbotSlpMpcNode.cpp │ │ ├── BallbotSqpMpcNode.cpp │ │ ├── BallbotTargetPoseCommand.cpp │ │ └── DummyBallbotNode.cpp │ └── test │ │ └── ballbotIntegrationTest.cpp ├── ocs2_cartpole │ ├── CMakeLists.txt │ ├── auto_generated │ │ └── .gitignore │ ├── config │ │ ├── mpc │ │ │ └── task.info │ │ └── multiplot │ │ │ ├── mpc_metrics.xml │ │ │ └── mpc_observation.xml │ ├── include │ │ └── ocs2_cartpole │ │ │ ├── CartPoleInterface.h │ │ │ ├── CartPoleParameters.h │ │ │ ├── definitions.h │ │ │ ├── dynamics │ │ │ └── CartPoleSystemDynamics.h │ │ │ └── package_path.h.in │ ├── package.xml │ ├── src │ │ └── CartPoleInterface.cpp │ └── test │ │ └── testCartpole.cpp ├── ocs2_cartpole_ros │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_cartpole_ros │ │ │ └── CartpoleDummyVisualization.h │ ├── launch │ │ ├── cartpole.launch │ │ ├── multiplot.launch │ │ └── visualize.launch │ ├── package.xml │ ├── rviz │ │ └── cartpole.rviz │ └── src │ │ ├── CartpoleDummyVisualization.cpp │ │ ├── CartpoleMpcNode.cpp │ │ └── DummyCartpoleNode.cpp ├── ocs2_double_integrator │ ├── CMakeLists.txt │ ├── auto_generated │ │ └── .gitignore │ ├── config │ │ └── mpc │ │ │ └── task.info │ ├── include │ │ └── ocs2_double_integrator │ │ │ ├── DoubleIntegratorInterface.h │ │ │ ├── DoubleIntegratorPyBindings.h │ │ │ ├── definitions.h │ │ │ └── package_path.h.in │ ├── package.xml │ ├── setup.py │ ├── src │ │ ├── DoubleIntegratorInterface.cpp │ │ ├── ocs2_double_integrator │ │ │ └── __init__.py │ │ └── pyBindModule.cpp │ └── test │ │ ├── DoubleIntegratorNoRosIntegrationTest.cpp │ │ ├── DoubleIntegratorPyBindingTest.cpp │ │ └── DoubleIntegratorPyBindingTest.py ├── ocs2_double_integrator_ros │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_double_integrator_ros │ │ │ └── DoubleIntegratorDummyVisualization.h │ ├── launch │ │ ├── double_integrator.launch │ │ ├── multiplot.launch │ │ └── visualize.launch │ ├── package.xml │ ├── rviz │ │ └── double_integrator.rviz │ └── src │ │ ├── DoubleIntegratorDummyVisualization.cpp │ │ ├── DoubleIntegratorMpcNode.cpp │ │ ├── DoubleIntegratorTargetPoseCommand.cpp │ │ └── DummyDoubleIntegratorNode.cpp ├── ocs2_legged_robot │ ├── CMakeLists.txt │ ├── auto_generated │ │ └── .gitignore │ ├── config │ │ ├── command │ │ │ ├── gait.info │ │ │ └── reference.info │ │ ├── mpc │ │ │ └── task.info │ │ └── multiplot │ │ │ ├── friction_cone.xml │ │ │ └── zero_velocity.xml │ ├── include │ │ └── ocs2_legged_robot │ │ │ ├── LeggedRobotInterface.h │ │ │ ├── LeggedRobotPreComputation.h │ │ │ ├── common │ │ │ ├── ModelSettings.h │ │ │ ├── Types.h │ │ │ └── utils.h │ │ │ ├── constraint │ │ │ ├── EndEffectorLinearConstraint.h │ │ │ ├── FrictionConeConstraint.h │ │ │ ├── NormalVelocityConstraintCppAd.h │ │ │ ├── ZeroForceConstraint.h │ │ │ └── ZeroVelocityConstraintCppAd.h │ │ │ ├── cost │ │ │ └── LeggedRobotQuadraticTrackingCost.h │ │ │ ├── dynamics │ │ │ └── LeggedRobotDynamicsAD.h │ │ │ ├── foot_planner │ │ │ ├── CubicSpline.h │ │ │ ├── SplineCpg.h │ │ │ └── SwingTrajectoryPlanner.h │ │ │ ├── gait │ │ │ ├── Gait.h │ │ │ ├── GaitSchedule.h │ │ │ ├── LegLogic.h │ │ │ ├── ModeSequenceTemplate.h │ │ │ └── MotionPhaseDefinition.h │ │ │ ├── initialization │ │ │ └── LeggedRobotInitializer.h │ │ │ ├── package_path.h.in │ │ │ └── reference_manager │ │ │ └── SwitchedModelReferenceManager.h │ ├── package.xml │ ├── src │ │ ├── LeggedRobotInterface.cpp │ │ ├── LeggedRobotPreComputation.cpp │ │ ├── common │ │ │ └── ModelSettings.cpp │ │ ├── constraint │ │ │ ├── EndEffectorLinearConstraint.cpp │ │ │ ├── FrictionConeConstraint.cpp │ │ │ ├── NormalVelocityConstraintCppAd.cpp │ │ │ ├── ZeroForceConstraint.cpp │ │ │ └── ZeroVelocityConstraintCppAd.cpp │ │ ├── dynamics │ │ │ └── LeggedRobotDynamicsAD.cpp │ │ ├── foot_planner │ │ │ ├── CubicSpline.cpp │ │ │ ├── SplineCpg.cpp │ │ │ └── SwingTrajectoryPlanner.cpp │ │ ├── gait │ │ │ ├── Gait.cpp │ │ │ ├── GaitSchedule.cpp │ │ │ ├── LegLogic.cpp │ │ │ └── ModeSequenceTemplate.cpp │ │ ├── initialization │ │ │ └── LeggedRobotInitializer.cpp │ │ └── reference_manager │ │ │ └── SwitchedModelReferenceManager.cpp │ └── test │ │ ├── AnymalFactoryFunctions.cpp │ │ ├── constraint │ │ ├── testEndEffectorLinearConstraint.cpp │ │ ├── testFrictionConeConstraint.cpp │ │ └── testZeroForceConstraint.cpp │ │ └── include │ │ └── ocs2_legged_robot │ │ └── test │ │ └── AnymalFactoryFunctions.h ├── ocs2_legged_robot_ros │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_legged_robot_ros │ │ │ ├── gait │ │ │ ├── GaitKeyboardPublisher.h │ │ │ ├── GaitReceiver.h │ │ │ └── ModeSequenceTemplateRos.h │ │ │ └── visualization │ │ │ └── LeggedRobotVisualizer.h │ ├── launch │ │ ├── legged_robot_ddp.launch │ │ ├── legged_robot_ipm.launch │ │ ├── legged_robot_sqp.launch │ │ └── multiplot.launch │ ├── package.xml │ ├── rviz │ │ └── legged_robot.rviz │ └── src │ │ ├── LeggedRobotDdpMpcNode.cpp │ │ ├── LeggedRobotDummyNode.cpp │ │ ├── LeggedRobotGaitCommandNode.cpp │ │ ├── LeggedRobotIpmMpcNode.cpp │ │ ├── LeggedRobotPoseCommandNode.cpp │ │ ├── LeggedRobotSqpMpcNode.cpp │ │ ├── gait │ │ ├── GaitKeyboardPublisher.cpp │ │ └── GaitReceiver.cpp │ │ └── visualization │ │ └── LeggedRobotVisualizer.cpp ├── ocs2_mobile_manipulator │ ├── CMakeLists.txt │ ├── auto_generated │ │ └── .gitignore │ ├── config │ │ ├── franka │ │ │ └── task.info │ │ ├── kinova │ │ │ ├── task_j2n6.info │ │ │ └── task_j2n7.info │ │ ├── mabi_mobile │ │ │ └── task.info │ │ ├── pr2 │ │ │ └── task.info │ │ └── ridgeback_ur5 │ │ │ └── task.info │ ├── include │ │ └── ocs2_mobile_manipulator │ │ │ ├── AccessHelperFunctions.h │ │ │ ├── FactoryFunctions.h │ │ │ ├── ManipulatorModelInfo.h │ │ │ ├── MobileManipulatorInterface.h │ │ │ ├── MobileManipulatorPinocchioMapping.h │ │ │ ├── MobileManipulatorPreComputation.h │ │ │ ├── constraint │ │ │ ├── EndEffectorConstraint.h │ │ │ └── MobileManipulatorSelfCollisionConstraint.h │ │ │ ├── cost │ │ │ └── QuadraticInputCost.h │ │ │ ├── dynamics │ │ │ ├── DefaultManipulatorDynamics.h │ │ │ ├── FloatingArmManipulatorDynamics.h │ │ │ ├── FullyActuatedFloatingArmManipulatorDynamics.h │ │ │ └── WheelBasedMobileManipulatorDynamics.h │ │ │ ├── implementation │ │ │ └── AccessHelperFunctionsImpl.h │ │ │ └── package_path.h.in │ ├── package.xml │ ├── src │ │ ├── FactoryFunctions.cpp │ │ ├── MobileManipulatorInterface.cpp │ │ ├── MobileManipulatorPinocchioMapping.cpp │ │ ├── MobileManipulatorPreComputation.cpp │ │ ├── constraint │ │ │ └── EndEffectorConstraint.cpp │ │ └── dynamics │ │ │ ├── DefaultManipulatorDynamics.cpp │ │ │ ├── FloatingArmManipulatorDynamics.cpp │ │ │ ├── FullyActuatedFloatingArmManipulatorDynamics.cpp │ │ │ └── WheelBasedMobileManipulatorDynamics.cpp │ └── test │ │ ├── testDummyMobileManipulator.cpp │ │ ├── testEndEffectorConstraint.cpp │ │ └── testSelfCollision.cpp ├── ocs2_mobile_manipulator_ros │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_mobile_manipulator_ros │ │ │ └── MobileManipulatorDummyVisualization.h │ ├── launch │ │ ├── include │ │ │ ├── mobile_manipulator.launch │ │ │ ├── mobile_manipulator_distance.launch │ │ │ └── visualize.launch │ │ ├── manipulator_franka.launch │ │ ├── manipulator_kinova_j2n6.launch │ │ ├── manipulator_kinova_j2n7.launch │ │ ├── manipulator_mabi_mobile.launch │ │ ├── manipulator_pr2.launch │ │ └── manipulator_ridgeback_ur5.launch │ ├── package.xml │ ├── rviz │ │ ├── mobile_manipulator.rviz │ │ └── mobile_manipulator_distance.rviz │ └── src │ │ ├── MobileManipulatorDistanceVisualization.cpp │ │ ├── MobileManipulatorDummyMRT.cpp │ │ ├── MobileManipulatorDummyVisualization.cpp │ │ ├── MobileManipulatorMpcNode.cpp │ │ └── MobileManipulatorTarget.cpp ├── ocs2_perceptive_anymal │ ├── ocs2_anymal │ │ ├── CMakeLists.txt │ │ └── package.xml │ ├── ocs2_anymal_commands │ │ ├── CMakeLists.txt │ │ ├── config │ │ │ ├── gait.info │ │ │ ├── motions.info │ │ │ └── motions │ │ │ │ ├── demo_motion.txt │ │ │ │ └── walking.txt │ │ ├── include │ │ │ └── ocs2_anymal_commands │ │ │ │ ├── LoadMotions.h │ │ │ │ ├── ModeSequenceKeyboard.h │ │ │ │ ├── MotionCommandController.h │ │ │ │ ├── MotionCommandDummy.h │ │ │ │ ├── MotionCommandInterface.h │ │ │ │ ├── PoseCommandToCostDesiredRos.h │ │ │ │ ├── ReferenceExtrapolation.h │ │ │ │ └── TerrainAdaptation.h │ │ ├── package.xml │ │ ├── src │ │ │ ├── AnymalGaitNode.cpp │ │ │ ├── AnymalMotionCommandNode.cpp │ │ │ ├── AnymalPoseCommandNode.cpp │ │ │ ├── LoadMotions.cpp │ │ │ ├── ModeSequenceKeyboard.cpp │ │ │ ├── MotionCommandController.cpp │ │ │ ├── MotionCommandDummy.cpp │ │ │ ├── MotionCommandInterface.cpp │ │ │ ├── PoseCommandToCostDesiredRos.cpp │ │ │ ├── ReferenceExtrapolation.cpp │ │ │ └── TerrainAdaptation.cpp │ │ └── test │ │ │ ├── data │ │ │ ├── animatedMotion.txt │ │ │ ├── cartesianMotion.txt │ │ │ ├── testCsv.txt │ │ │ └── testMotion.txt │ │ │ ├── testLoadMotions.cpp │ │ │ ├── testReferenceExtrapolation.cpp │ │ │ └── testTerrainAdaptation.cpp │ ├── ocs2_anymal_loopshaping_mpc │ │ ├── CMakeLists.txt │ │ ├── config │ │ │ ├── c_series │ │ │ │ ├── frame_declaration.info │ │ │ │ ├── loopshaping.info │ │ │ │ ├── multiple_shooting.info │ │ │ │ └── task.info │ │ │ └── rviz │ │ │ │ └── demo_config.rviz │ │ ├── data │ │ │ ├── demo_terrain.png │ │ │ ├── gaps.png │ │ │ ├── hurdles.png │ │ │ ├── side_gap.png │ │ │ ├── step.png │ │ │ └── stepping_stones.png │ │ ├── include │ │ │ └── ocs2_anymal_loopshaping_mpc │ │ │ │ └── AnymalLoopshapingInterface.h │ │ ├── launch │ │ │ ├── anymal_c.launch │ │ │ ├── camel.launch │ │ │ ├── mpc.launch │ │ │ └── perceptive_mpc_demo.launch │ │ ├── package.xml │ │ ├── src │ │ │ ├── AnymalLoopshapingDummyMrt.cpp │ │ │ ├── AnymalLoopshapingInterface.cpp │ │ │ ├── AnymalLoopshapingMpcNode.cpp │ │ │ └── PerceptiveMpcDemo.cpp │ │ └── test │ │ │ ├── testMotionTracking.cpp │ │ │ ├── testProblemFormulation.cpp │ │ │ └── testSensitivity.cpp │ ├── ocs2_anymal_models │ │ ├── CMakeLists.txt │ │ ├── config │ │ │ └── visualize_urdf.rviz │ │ ├── include │ │ │ └── ocs2_anymal_models │ │ │ │ ├── .gitignore │ │ │ │ ├── AnymalModels.h │ │ │ │ ├── DynamicsHelpers.h │ │ │ │ ├── FrameDeclaration.h │ │ │ │ ├── QuadrupedCom.h │ │ │ │ ├── QuadrupedInverseKinematics.h │ │ │ │ ├── QuadrupedKinematics.h │ │ │ │ ├── QuadrupedPinocchioMapping.h │ │ │ │ └── package_path.h.in │ │ ├── launch │ │ │ ├── load_urdf.launch │ │ │ └── vizualize_urdf.launch │ │ ├── package.xml │ │ ├── src │ │ │ ├── AnymalModels.cpp │ │ │ ├── FrameDeclaration.cpp │ │ │ ├── QuadrupedCom.cpp │ │ │ ├── QuadrupedInverseKinematics.cpp │ │ │ ├── QuadrupedKinematics.cpp │ │ │ └── QuadrupedPinocchioMapping.cpp │ │ ├── test │ │ │ ├── TestDynamicsHelpers.cpp │ │ │ ├── TestFrameDeclaration.cpp │ │ │ ├── TestInverseKinematics.cpp │ │ │ ├── TestQuadrupedPinocchioCom.cpp │ │ │ ├── TestQuadrupedPinocchioKinematics.cpp │ │ │ └── camel │ │ │ │ ├── AnymalCamelCom.cpp │ │ │ │ ├── AnymalCamelCom.h │ │ │ │ ├── AnymalCamelKinematics.cpp │ │ │ │ ├── AnymalCamelKinematics.h │ │ │ │ ├── RobcogenHelpers.h │ │ │ │ └── generated │ │ │ │ ├── declarations.h │ │ │ │ ├── default_dynparams_getter.h │ │ │ │ ├── dynamics_parameters.h │ │ │ │ ├── forward_dynamics.h │ │ │ │ ├── forward_dynamics.impl.h │ │ │ │ ├── inertia_properties.h │ │ │ │ ├── inertia_properties.impl.h │ │ │ │ ├── inverse_dynamics.h │ │ │ │ ├── inverse_dynamics.impl.h │ │ │ │ ├── jacobians.h │ │ │ │ ├── jacobians.impl.h │ │ │ │ ├── joint_data_map.h │ │ │ │ ├── jsim.h │ │ │ │ ├── jsim.impl.h │ │ │ │ ├── kinematics_parameters.h │ │ │ │ ├── link_data_map.h │ │ │ │ ├── miscellaneous.cpp │ │ │ │ ├── miscellaneous.h │ │ │ │ ├── traits.h │ │ │ │ ├── transforms.h │ │ │ │ └── transforms.impl.h │ │ └── urdf │ │ │ ├── anymal_camel_rsl.urdf │ │ │ └── frame_declaration_anymal_c.info │ ├── ocs2_anymal_mpc │ │ ├── CMakeLists.txt │ │ ├── config │ │ │ └── c_series │ │ │ │ ├── frame_declaration.info │ │ │ │ ├── multiple_shooting.info │ │ │ │ ├── targetCommand.info │ │ │ │ └── task.info │ │ ├── include │ │ │ └── ocs2_anymal_mpc │ │ │ │ └── AnymalInterface.h │ │ ├── launch │ │ │ ├── camel.launch │ │ │ └── mpc.launch │ │ ├── package.xml │ │ ├── src │ │ │ ├── AnymalDummyMRT.cpp │ │ │ ├── AnymalInterface.cpp │ │ │ └── AnymalMpcNode.cpp │ │ └── test │ │ │ └── testProblemFormulation.cpp │ ├── ocs2_quadruped_interface │ │ ├── CMakeLists.txt │ │ ├── config │ │ │ └── config.rviz │ │ ├── include │ │ │ └── ocs2_quadruped_interface │ │ │ │ ├── QuadrupedDummyNode.h │ │ │ │ ├── QuadrupedInterface.h │ │ │ │ ├── QuadrupedLogger.h │ │ │ │ ├── QuadrupedMpc.h │ │ │ │ ├── QuadrupedMpcNode.h │ │ │ │ ├── QuadrupedPointfootInterface.h │ │ │ │ ├── QuadrupedTfPublisher.h │ │ │ │ ├── QuadrupedVisualizer.h │ │ │ │ ├── SwingPlanningVisualizer.h │ │ │ │ ├── TerrainPlaneVisualizer.h │ │ │ │ └── TerrainReceiver.h │ │ ├── launch │ │ │ └── visualization.launch │ │ ├── package.xml │ │ └── src │ │ │ ├── QuadrupedDummyNode.cpp │ │ │ ├── QuadrupedInterface.cpp │ │ │ ├── QuadrupedLogger.cpp │ │ │ ├── QuadrupedMpc.cpp │ │ │ ├── QuadrupedMpcNode.cpp │ │ │ ├── QuadrupedPointfootInterface.cpp │ │ │ ├── QuadrupedTfPublisher.cpp │ │ │ ├── QuadrupedVisualizer.cpp │ │ │ ├── SwingPlanningVisualizer.cpp │ │ │ ├── TerrainPlaneVisualizer.cpp │ │ │ └── TerrainReceiver.cpp │ ├── ocs2_quadruped_loopshaping_interface │ │ ├── CMakeLists.txt │ │ ├── include │ │ │ └── ocs2_quadruped_loopshaping_interface │ │ │ │ ├── LoopshapingDimensions.h │ │ │ │ ├── QuadrupedLoopshapingDummyNode.h │ │ │ │ ├── QuadrupedLoopshapingInterface.h │ │ │ │ ├── QuadrupedLoopshapingMpc.h │ │ │ │ └── QuadrupedLoopshapingMpcNode.h │ │ ├── package.xml │ │ └── src │ │ │ ├── QuadrupedLoopshapingDummyNode.cpp │ │ │ ├── QuadrupedLoopshapingInterface.cpp │ │ │ ├── QuadrupedLoopshapingMpc.cpp │ │ │ └── QuadrupedLoopshapingMpcNode.cpp │ ├── ocs2_switched_model_interface │ │ ├── CMakeLists.txt │ │ ├── include │ │ │ └── ocs2_switched_model_interface │ │ │ │ ├── analytical_inverse_kinematics │ │ │ │ ├── AnalyticalInverseKinematics.h │ │ │ │ └── LegInverseKinematicParameters.h │ │ │ │ ├── constraint │ │ │ │ ├── EndEffectorVelocityConstraint.h │ │ │ │ ├── FootNormalConstraint.h │ │ │ │ ├── FrictionConeConstraint.h │ │ │ │ └── ZeroForceConstraint.h │ │ │ │ ├── core │ │ │ │ ├── ComModelBase.h │ │ │ │ ├── InverseKinematicsModelBase.h │ │ │ │ ├── KinematicsModelBase.h │ │ │ │ ├── ModelSettings.h │ │ │ │ ├── MotionPhaseDefinition.h │ │ │ │ ├── Rotations.h │ │ │ │ ├── SwitchedModel.h │ │ │ │ ├── SwitchedModelPrecomputation.h │ │ │ │ └── TorqueApproximation.h │ │ │ │ ├── cost │ │ │ │ ├── CollisionAvoidanceCost.h │ │ │ │ ├── CostElements.h │ │ │ │ ├── FootPlacementCost.h │ │ │ │ ├── FrictionConeCost.h │ │ │ │ ├── LinearStateInequalitySoftconstraint.h │ │ │ │ ├── MotionTrackingCost.h │ │ │ │ ├── MotionTrackingTerminalCost.h │ │ │ │ └── TorqueLimitsSoftConstraint.h │ │ │ │ ├── dynamics │ │ │ │ ├── ComKinoDynamicsParameters.h │ │ │ │ └── ComKinoSystemDynamicsAd.h │ │ │ │ ├── foot_planner │ │ │ │ ├── CubicSpline.h │ │ │ │ ├── FootPhase.h │ │ │ │ ├── KinematicFootPlacementPenalty.h │ │ │ │ ├── QuinticSplineSwing.h │ │ │ │ ├── SplineCpg.h │ │ │ │ ├── SwingSpline3d.h │ │ │ │ └── SwingTrajectoryPlanner.h │ │ │ │ ├── initialization │ │ │ │ └── ComKinoInitializer.h │ │ │ │ ├── logic │ │ │ │ ├── DynamicsParametersSynchronizedModule.h │ │ │ │ ├── Gait.h │ │ │ │ ├── GaitAdaptation.h │ │ │ │ ├── GaitReceiver.h │ │ │ │ ├── GaitSchedule.h │ │ │ │ ├── GaitSwitching.h │ │ │ │ ├── ModeSequenceTemplate.h │ │ │ │ ├── SingleLegLogic.h │ │ │ │ └── SwitchedModelModeScheduleManager.h │ │ │ │ ├── ros_msg_conversions │ │ │ │ └── RosMsgConversions.h │ │ │ │ ├── terrain │ │ │ │ ├── ConvexTerrain.h │ │ │ │ ├── PlanarSignedDistanceField.h │ │ │ │ ├── PlanarTerrainModel.h │ │ │ │ ├── PlaneFitting.h │ │ │ │ ├── SignedDistanceField.h │ │ │ │ ├── TerrainModel.h │ │ │ │ └── TerrainPlane.h │ │ │ │ └── test │ │ │ │ └── TestEvaluateConstraints.h │ │ ├── package.xml │ │ ├── src │ │ │ ├── analytical_inverse_kinematics │ │ │ │ ├── AnalyticalInverseKinematics.cpp │ │ │ │ └── LegInverseKinematicParameters.cpp │ │ │ ├── constraint │ │ │ │ ├── EndEffectorVelocityConstraint.cpp │ │ │ │ ├── FootNormalConstraint.cpp │ │ │ │ ├── FrictionConeConstraint.cpp │ │ │ │ └── ZeroForceConstraint.cpp │ │ │ ├── core │ │ │ │ ├── ComModelBase.cpp │ │ │ │ ├── KinematicsModelBase.cpp │ │ │ │ ├── ModelSettings.cpp │ │ │ │ ├── SwitchedModelPrecomputation.cpp │ │ │ │ └── TorqueApproximation.cpp │ │ │ ├── cost │ │ │ │ ├── CollisionAvoidanceCost.cpp │ │ │ │ ├── FootPlacementCost.cpp │ │ │ │ ├── FrictionConeCost.cpp │ │ │ │ ├── LinearStateInequalitySoftConstraint.cpp │ │ │ │ ├── MotionTrackingCost.cpp │ │ │ │ ├── MotionTrackingTerminalCost.cpp │ │ │ │ └── TorqueLimitsSoftConstraint.cpp │ │ │ ├── dynamics │ │ │ │ ├── ComKinoDynamicsParameters.cpp │ │ │ │ └── ComKinoSystemDynamicsAd.cpp │ │ │ ├── foot_planner │ │ │ │ ├── CubicSpline.cpp │ │ │ │ ├── FootPhase.cpp │ │ │ │ ├── KinematicFootPlacementPenalty.cpp │ │ │ │ ├── QuinticSplineSwing.cpp │ │ │ │ ├── SplineCpg.cpp │ │ │ │ ├── SwingSpline3d.cpp │ │ │ │ └── SwingTrajectoryPlanner.cpp │ │ │ ├── initialization │ │ │ │ └── ComKinoInitializer.cpp │ │ │ ├── logic │ │ │ │ ├── DynamicsParametersSynchronizedModule.cpp │ │ │ │ ├── Gait.cpp │ │ │ │ ├── GaitAdaptation.cpp │ │ │ │ ├── GaitReceiver.cpp │ │ │ │ ├── GaitSchedule.cpp │ │ │ │ ├── ModeSequenceTemplate.cpp │ │ │ │ ├── SingleLegLogic.cpp │ │ │ │ └── SwitchedModelModeScheduleManager.cpp │ │ │ ├── ros_msg_conversions │ │ │ │ └── RosMsgConversions.cpp │ │ │ ├── terrain │ │ │ │ ├── PlanarSignedDistanceField.cpp │ │ │ │ ├── PlanarTerrainModel.cpp │ │ │ │ ├── PlaneFitting.cpp │ │ │ │ └── TerrainPlane.cpp │ │ │ └── testConstraints.cpp │ │ └── test │ │ │ ├── constraint │ │ │ ├── testFrictionConeConstraint.cpp │ │ │ └── testZeroForceConstraint.cpp │ │ │ ├── core │ │ │ └── testRotation.cpp │ │ │ ├── cost │ │ │ ├── testFootplacementCost.cpp │ │ │ ├── testFrictionConeCost.cpp │ │ │ └── testTorqueLimitsSoftConstraint.cpp │ │ │ ├── foot_planner │ │ │ └── testSwingPhase.cpp │ │ │ ├── logic │ │ │ ├── testEarlyTouchDown.cpp │ │ │ ├── testExtractContractTimings.cpp │ │ │ ├── testGait.cpp │ │ │ ├── testGaitSchedule.cpp │ │ │ ├── testGaitSwitching.cpp │ │ │ └── testSingleLegLogic.cpp │ │ │ └── terrain │ │ │ ├── testConvexTerrain.cpp │ │ │ └── testTerrainPlane.cpp │ ├── ocs2_switched_model_msgs │ │ ├── CMakeLists.txt │ │ ├── msg │ │ │ ├── gait.msg │ │ │ ├── gait_sequence.msg │ │ │ └── scheduled_gait_sequence.msg │ │ ├── package.xml │ │ └── srv │ │ │ └── trajectory_request.srv │ └── segmented_planes_terrain_model │ │ ├── CMakeLists.txt │ │ ├── include │ │ └── segmented_planes_terrain_model │ │ │ ├── SegmentedPlanesSignedDistanceField.h │ │ │ ├── SegmentedPlanesTerrainModel.h │ │ │ ├── SegmentedPlanesTerrainModelRos.h │ │ │ └── SegmentedPlanesTerrainVisualization.h │ │ ├── package.xml │ │ └── src │ │ ├── SegmentedPlanesTerrainModel.cpp │ │ ├── SegmentedPlanesTerrainModelRos.cpp │ │ └── SegmentedPlanesTerrainVisualization.cpp ├── ocs2_quadrotor │ ├── CMakeLists.txt │ ├── auto_generated │ │ └── .gitignore │ ├── config │ │ └── mpc │ │ │ └── task.info │ ├── include │ │ └── ocs2_quadrotor │ │ │ ├── QuadrotorInterface.h │ │ │ ├── QuadrotorParameters.h │ │ │ ├── QuadrotorPyBindings.h │ │ │ ├── definitions.h │ │ │ ├── dynamics │ │ │ └── QuadrotorSystemDynamics.h │ │ │ └── package_path.h.in │ ├── package.xml │ ├── setup.py │ ├── src │ │ ├── QuadrotorInterface.cpp │ │ ├── QuadrotorSystemDynamics.cpp │ │ ├── ocs2_quadrotor │ │ │ └── __init__.py │ │ └── pyBindModule.cpp │ └── test │ │ └── PyBindingsTest.cpp ├── ocs2_quadrotor_ros │ ├── CMakeLists.txt │ ├── include │ │ └── ocs2_quadrotor_ros │ │ │ └── QuadrotorDummyVisualization.h │ ├── launch │ │ ├── multiplot.launch │ │ ├── quadrotor.launch │ │ └── visualize.launch │ ├── package.xml │ ├── rviz │ │ └── quadrotor.rviz │ └── src │ │ ├── DummyQuadrotorNode.cpp │ │ ├── QuadrotorDummyVisualization.cpp │ │ ├── QuadrotorMpcNode.cpp │ │ └── QuadrotorTargetPoseCommand.cpp └── ocs2_robotic_examples │ ├── CMakeLists.txt │ └── package.xml ├── ocs2_robotic_tools ├── CMakeLists.txt ├── include │ └── ocs2_robotic_tools │ │ ├── common │ │ ├── AngularVelocityMapping.h │ │ ├── LoopshapingRobotInterface.h │ │ ├── RobotInterface.h │ │ ├── RotationDerivativesTransforms.h │ │ ├── RotationTransforms.h │ │ └── SkewSymmetricMatrix.h │ │ └── end_effector │ │ └── EndEffectorKinematics.h ├── package.xml ├── src │ ├── common │ │ ├── LoopshapingRobotInterface.cpp │ │ └── RotationTransforms.cpp │ └── lintTarget.cpp └── test │ └── common │ ├── TestRotationDerivativesTransforms.cpp │ └── TestRotationTransforms.cpp ├── ocs2_ros_interfaces ├── CMakeLists.txt ├── include │ └── ocs2_ros_interfaces │ │ ├── command │ │ ├── TargetTrajectoriesInteractiveMarker.h │ │ ├── TargetTrajectoriesKeyboardPublisher.h │ │ └── TargetTrajectoriesRosPublisher.h │ │ ├── common │ │ ├── RosMsgConversions.h │ │ └── RosMsgHelpers.h │ │ ├── mpc │ │ └── MPC_ROS_Interface.h │ │ ├── mrt │ │ ├── DummyObserver.h │ │ ├── LoopshapingDummyObserver.h │ │ ├── MRT_ROS_Dummy_Loop.h │ │ └── MRT_ROS_Interface.h │ │ ├── synchronized_module │ │ ├── RosReferenceManager.h │ │ └── SolverObserverRosCallbacks.h │ │ └── visualization │ │ ├── VisualizationColors.h │ │ └── VisualizationHelpers.h ├── launch │ └── performance_indices.launch ├── multiplot │ └── performance_indices.xml ├── package.xml ├── src │ ├── command │ │ ├── TargetTrajectoriesInteractiveMarker.cpp │ │ ├── TargetTrajectoriesKeyboardPublisher.cpp │ │ └── TargetTrajectoriesRosPublisher.cpp │ ├── common │ │ ├── RosMsgConversions.cpp │ │ └── RosMsgHelpers.cpp │ ├── lintTarget.cpp │ ├── mpc │ │ └── MPC_ROS_Interface.cpp │ ├── mrt │ │ ├── LoopshapingDummyObserver.cpp │ │ ├── MRT_ROS_Dummy_Loop.cpp │ │ └── MRT_ROS_Interface.cpp │ ├── multiplot │ │ └── MultiplotRemap.cpp │ ├── synchronized_module │ │ ├── RosReferenceManager.cpp │ │ └── SolverObserverRosCallbacks.cpp │ └── visualization │ │ ├── VisualizationColors.cpp │ │ └── VisualizationHelpers.cpp └── test │ └── test_custom_callback_queue.cpp ├── ocs2_slp ├── CMakeLists.txt ├── include │ └── ocs2_slp │ │ ├── Helpers.h │ │ ├── SlpMpc.h │ │ ├── SlpSettings.h │ │ ├── SlpSolver.h │ │ ├── SlpSolverStatus.h │ │ └── pipg │ │ ├── PipgBounds.h │ │ ├── PipgSettings.h │ │ ├── PipgSolver.h │ │ ├── PipgSolverStatus.h │ │ └── SingleThreadPipg.h ├── package.xml ├── src │ ├── Helpers.cpp │ ├── SlpSettings.cpp │ ├── SlpSolver.cpp │ ├── lintTarget.cpp │ └── pipg │ │ ├── PipgSettings.cpp │ │ ├── PipgSolver.cpp │ │ └── SingleThreadPipg.cpp └── test │ ├── testHelpers.cpp │ ├── testPipgSolver.cpp │ └── testSlpSolver.cpp ├── ocs2_sqp ├── blasfeo_catkin │ ├── CMakeLists.txt │ ├── cmake │ │ └── blasfeo-extras.cmake.in │ └── package.xml ├── hpipm_catkin │ ├── CMakeLists.txt │ ├── include │ │ └── hpipm_catkin │ │ │ ├── HpipmInterface.h │ │ │ └── HpipmInterfaceSettings.h │ ├── package.xml │ ├── src │ │ ├── HpipmInterface.cpp │ │ └── HpipmInterfaceSettings.cpp │ └── test │ │ └── testHpipmInterface.cpp └── ocs2_sqp │ ├── CMakeLists.txt │ ├── README.md │ ├── doc │ ├── LQR_full.pdf │ └── deduction.pdf │ ├── include │ └── ocs2_sqp │ │ ├── SqpLogging.h │ │ ├── SqpMpc.h │ │ ├── SqpSettings.h │ │ ├── SqpSolver.h │ │ └── SqpSolverStatus.h │ ├── logging │ ├── .gitignore │ └── ReadSqpLog.py │ ├── package.xml │ ├── src │ ├── SqpLogging.cpp │ ├── SqpSettings.cpp │ └── SqpSolver.cpp │ └── test │ ├── testCircularKinematics.cpp │ ├── testLogging.cpp │ ├── testSwitchedProblem.cpp │ ├── testUnconstrained.cpp │ └── testValuefunction.cpp ├── ocs2_test_tools └── ocs2_qp_solver │ ├── CMakeLists.txt │ ├── include │ └── ocs2_qp_solver │ │ ├── Ocs2QpSolver.h │ │ ├── QpDiscreteTranscription.h │ │ ├── QpSolver.h │ │ ├── QpSolverTypes.h │ │ └── QpTrajectories.h │ ├── package.xml │ ├── src │ ├── Ocs2QpSolver.cpp │ ├── QpDiscreteTranscription.cpp │ ├── QpSolver.cpp │ └── QpTrajectories.cpp │ └── test │ ├── include │ └── ocs2_qp_solver │ │ └── test │ │ └── testProblemsGeneration.h │ ├── testDiscreteTranscription.cpp │ ├── testOcs2QpSolver.cpp │ └── testQpSolver.cpp └── ocs2_thirdparty ├── CMakeLists.txt ├── include ├── cppad │ ├── COPYING │ ├── Version.txt │ ├── authors │ ├── base_require.hpp │ ├── cg.hpp │ ├── cg │ │ ├── AUTHORS │ │ ├── COPYING │ │ ├── Version.txt │ │ ├── abstract_atomic_fun.hpp │ │ ├── argument.hpp │ │ ├── arithmetic.hpp │ │ ├── arithmetic_ad.hpp │ │ ├── arithmetic_assign.hpp │ │ ├── array_id_compresser.hpp │ │ ├── array_view.hpp │ │ ├── atomic_dependency_locator.hpp │ │ ├── atomic_fun.hpp │ │ ├── atomic_fun_bridge.hpp │ │ ├── base_abstract_atomic_fun.hpp │ │ ├── base_double.hpp │ │ ├── base_float.hpp │ │ ├── bidir_graph.hpp │ │ ├── cg.hpp │ │ ├── code_handler.hpp │ │ ├── code_handler_impl.hpp │ │ ├── code_handler_loops.hpp │ │ ├── code_handler_vector.hpp │ │ ├── collect_variable.hpp │ │ ├── compare.hpp │ │ ├── cond_exp_op.hpp │ │ ├── cppadcg.hpp │ │ ├── cppadcg_assert.hpp │ │ ├── custom_position.hpp │ │ ├── dae_index_reduction │ │ │ ├── augment_path.hpp │ │ │ ├── augment_path_depth_lookahead.hpp │ │ │ ├── augment_path_depth_lookahead_a.hpp │ │ │ ├── bipartite_graph.hpp │ │ │ ├── bipartite_nodes.hpp │ │ │ ├── dae_equation_info.hpp │ │ │ ├── dae_index_reduction.hpp │ │ │ ├── dae_structural_index_reduction.hpp │ │ │ ├── dae_var_info.hpp │ │ │ ├── dummy_deriv.hpp │ │ │ ├── dummy_deriv_util.hpp │ │ │ ├── pantelides.hpp │ │ │ ├── simple_logger.hpp │ │ │ ├── soares_secchi.hpp │ │ │ └── time_diff.hpp │ │ ├── debug.hpp │ │ ├── declare_cg.hpp │ │ ├── declare_cg_loops.hpp │ │ ├── default.hpp │ │ ├── epl-v10.txt │ │ ├── evaluator │ │ │ ├── evaluator.hpp │ │ │ ├── evaluator_ad.hpp │ │ │ ├── evaluator_adcg.hpp │ │ │ ├── evaluator_adolc.hpp │ │ │ ├── evaluator_cg.hpp │ │ │ └── evaluator_solve.hpp │ │ ├── exception.hpp │ │ ├── extra │ │ │ ├── declare_extra.hpp │ │ │ ├── extra.hpp │ │ │ ├── sparse_forjac_hessian.hpp │ │ │ └── sparsity.hpp │ │ ├── gpl3.txt │ │ ├── graph_mod.hpp │ │ ├── identical.hpp │ │ ├── job_timer.hpp │ │ ├── lang │ │ │ ├── c │ │ │ │ ├── lang_c_atomic_fun.hpp │ │ │ │ ├── lang_c_custom_var_name_gen.hpp │ │ │ │ ├── lang_c_default_hessian_var_name_gen.hpp │ │ │ │ ├── lang_c_default_reverse2_var_name_gen.hpp │ │ │ │ ├── lang_c_default_var_name_gen.hpp │ │ │ │ ├── lang_c_util.hpp │ │ │ │ ├── language_c.hpp │ │ │ │ ├── language_c_arrays.hpp │ │ │ │ ├── language_c_double.hpp │ │ │ │ ├── language_c_float.hpp │ │ │ │ ├── language_c_index_patterns.hpp │ │ │ │ └── language_c_loops.hpp │ │ │ ├── dot │ │ │ │ ├── dot.hpp │ │ │ │ ├── dot_util.hpp │ │ │ │ ├── language_dot.hpp │ │ │ │ ├── language_dot_arrays.hpp │ │ │ │ └── language_dot_index_patterns.hpp │ │ │ ├── lang_stream_stack.hpp │ │ │ ├── language.hpp │ │ │ ├── latex │ │ │ │ ├── lang_latex_custom_var_name_gen.hpp │ │ │ │ ├── lang_latex_default_var_name_gen.hpp │ │ │ │ ├── language_latex.hpp │ │ │ │ ├── language_latex_arrays.hpp │ │ │ │ ├── language_latex_index_patterns.hpp │ │ │ │ └── latex.hpp │ │ │ └── mathml │ │ │ │ ├── lang_mathml_custom_var_name_gen.hpp │ │ │ │ ├── lang_mathml_default_var_name_gen.hpp │ │ │ │ ├── language_mathml.hpp │ │ │ │ ├── language_mathml_arrays.hpp │ │ │ │ ├── language_mathml_index_patterns.hpp │ │ │ │ └── mathml.hpp │ │ ├── math.hpp │ │ ├── math_other.hpp │ │ ├── model │ │ │ ├── atomic_external_function_wrapper.hpp │ │ │ ├── atomic_generic_model.hpp │ │ │ ├── compiler │ │ │ │ ├── abstract_c_compiler.hpp │ │ │ │ ├── c_compiler.hpp │ │ │ │ ├── clang_compiler.hpp │ │ │ │ └── gcc_compiler.hpp │ │ │ ├── dynamic_lib │ │ │ │ ├── ar_archiver.hpp │ │ │ │ ├── archiver.hpp │ │ │ │ ├── dynamic_library_processor.hpp │ │ │ │ ├── dynamiclib.hpp │ │ │ │ └── linux │ │ │ │ │ ├── linux_dynamic_model_library_processor.hpp │ │ │ │ │ ├── linux_dynamiclib.hpp │ │ │ │ │ └── linux_dynamiclib_model.hpp │ │ │ ├── external_function_wrapper.hpp │ │ │ ├── functor_generic_model.hpp │ │ │ ├── functor_model_library.hpp │ │ │ ├── generic_model.hpp │ │ │ ├── generic_model_external_function_wrapper.hpp │ │ │ ├── llvm │ │ │ │ ├── llvm.hpp │ │ │ │ ├── llvm_base_model_library_processor.hpp │ │ │ │ ├── llvm_model.hpp │ │ │ │ ├── llvm_model_library.hpp │ │ │ │ ├── v3_2 │ │ │ │ │ ├── llvm3_2.hpp │ │ │ │ │ ├── llvm_model_library_3_2.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ ├── v3_4 │ │ │ │ │ ├── llvm3_4.hpp │ │ │ │ │ ├── llvm_model_library_3_4.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ ├── v3_6 │ │ │ │ │ ├── llvm3_6.hpp │ │ │ │ │ ├── llvm_model_library_3_6.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ ├── v3_8 │ │ │ │ │ ├── llvm3_8.hpp │ │ │ │ │ ├── llvm_model_library_3_8.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ ├── v4_0 │ │ │ │ │ ├── llvm4_0.hpp │ │ │ │ │ ├── llvm_model_library_4_0.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ ├── v5_0 │ │ │ │ │ ├── llvm5_0.hpp │ │ │ │ │ ├── llvm_base_model_library_processor_impl.hpp │ │ │ │ │ ├── llvm_model_library_impl.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ ├── v6_0 │ │ │ │ │ ├── llvm6_0.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ ├── v7_0 │ │ │ │ │ ├── llvm7_0.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ │ └── v8_0 │ │ │ │ │ ├── llvm8_0.hpp │ │ │ │ │ └── llvm_model_library_processor.hpp │ │ │ ├── model_c_source_gen.hpp │ │ │ ├── model_c_source_gen_for0.hpp │ │ │ ├── model_c_source_gen_for1.hpp │ │ │ ├── model_c_source_gen_hes.hpp │ │ │ ├── model_c_source_gen_impl.hpp │ │ │ ├── model_c_source_gen_jac.hpp │ │ │ ├── model_c_source_gen_rev1.hpp │ │ │ ├── model_c_source_gen_rev2.hpp │ │ │ ├── model_library.hpp │ │ │ ├── model_library_c_source_gen.hpp │ │ │ ├── model_library_c_source_gen_impl.hpp │ │ │ ├── model_library_processor.hpp │ │ │ ├── patterns │ │ │ │ ├── hessian_with_loops_info.hpp │ │ │ │ ├── model_c_source_gen_loops.hpp │ │ │ │ ├── model_c_source_gen_loops_for0.hpp │ │ │ │ ├── model_c_source_gen_loops_for1.hpp │ │ │ │ ├── model_c_source_gen_loops_hess.hpp │ │ │ │ ├── model_c_source_gen_loops_hess_r2.hpp │ │ │ │ ├── model_c_source_gen_loops_jac.hpp │ │ │ │ ├── model_c_source_gen_loops_jac_fr1.hpp │ │ │ │ ├── model_c_source_gen_loops_rev1.hpp │ │ │ │ └── model_c_source_gen_loops_rev2.hpp │ │ │ ├── save_files_model_library_processor.hpp │ │ │ ├── system │ │ │ │ ├── linux_system.hpp │ │ │ │ └── system.hpp │ │ │ └── threadpool │ │ │ │ ├── multi_threading_type.hpp │ │ │ │ ├── openmp_c.hpp │ │ │ │ ├── openmp_h.hpp │ │ │ │ ├── pthread_pool_c.hpp │ │ │ │ ├── pthread_pool_h.hpp │ │ │ │ └── thread_pool_schedule_strategy.hpp │ │ ├── nan.hpp │ │ ├── nodes │ │ │ ├── index_assign_operation_node.hpp │ │ │ ├── index_operation_node.hpp │ │ │ ├── loop_end_operation_node.hpp │ │ │ ├── loop_start_operation_node.hpp │ │ │ └── print_operation_node.hpp │ │ ├── operation.hpp │ │ ├── operation_node.hpp │ │ ├── operation_node_name_streambuf.hpp │ │ ├── operation_path.hpp │ │ ├── operation_path_node.hpp │ │ ├── operation_stack.hpp │ │ ├── ordered.hpp │ │ ├── ostream_config_restore.hpp │ │ ├── patterns │ │ │ ├── dependent_pattern_matcher.hpp │ │ │ ├── equation_group.hpp │ │ │ ├── equation_pattern.hpp │ │ │ ├── independent_node_sorter.hpp │ │ │ ├── index │ │ │ │ ├── index_pattern.hpp │ │ │ │ ├── index_pattern_impl.hpp │ │ │ │ ├── linear_index_pattern.hpp │ │ │ │ ├── plane_2d_index_pattern.hpp │ │ │ │ ├── random_1d_index_pattern.hpp │ │ │ │ ├── random_2d_index_pattern.hpp │ │ │ │ ├── random_index_pattern.hpp │ │ │ │ └── sectioned_index_pattern.hpp │ │ │ ├── iter_equation_group.hpp │ │ │ ├── loop.hpp │ │ │ ├── loop_free_model.hpp │ │ │ ├── loop_model.hpp │ │ │ └── loop_position.hpp │ │ ├── range.hpp │ │ ├── scope_path_element.hpp │ │ ├── smart_containers.hpp │ │ ├── solver.hpp │ │ ├── support │ │ │ └── cppadcg_eigen.hpp │ │ ├── unary.hpp │ │ ├── util.hpp │ │ ├── variable.hpp │ │ └── variable_name_generator.hpp │ ├── configure.hpp │ ├── core │ │ ├── abort_recording.hpp │ │ ├── abs.hpp │ │ ├── abs_normal_fun.hpp │ │ ├── acosh.hpp │ │ ├── ad.hpp │ │ ├── ad_assign.hpp │ │ ├── ad_binary.hpp │ │ ├── ad_ctor.hpp │ │ ├── ad_fun.hpp │ │ ├── ad_io.hpp │ │ ├── ad_to_string.hpp │ │ ├── ad_type.hpp │ │ ├── ad_valued.hpp │ │ ├── add.hpp │ │ ├── add_eq.hpp │ │ ├── arithmetic.hpp │ │ ├── asinh.hpp │ │ ├── atan2.hpp │ │ ├── atanh.hpp │ │ ├── atomic │ │ │ ├── atomic_one.hpp │ │ │ ├── atomic_three.hpp │ │ │ ├── atomic_two.hpp │ │ │ ├── three_afun.hpp │ │ │ ├── three_ctor.hpp │ │ │ ├── three_for_type.hpp │ │ │ ├── three_forward.hpp │ │ │ ├── three_hes_sparsity.hpp │ │ │ ├── three_jac_sparsity.hpp │ │ │ ├── three_rev_depend.hpp │ │ │ ├── three_reverse.hpp │ │ │ ├── two_afun.hpp │ │ │ ├── two_clear.hpp │ │ │ ├── two_ctor.hpp │ │ │ ├── two_for_sparse_hes.hpp │ │ │ ├── two_for_sparse_jac.hpp │ │ │ ├── two_forward.hpp │ │ │ ├── two_option.hpp │ │ │ ├── two_rev_depend.hpp │ │ │ ├── two_rev_sparse_hes.hpp │ │ │ ├── two_rev_sparse_jac.hpp │ │ │ └── two_reverse.hpp │ │ ├── azmul.hpp │ │ ├── base2ad.hpp │ │ ├── base_complex.hpp │ │ ├── base_cond_exp.hpp │ │ ├── base_double.hpp │ │ ├── base_float.hpp │ │ ├── base_hash.hpp │ │ ├── base_limits.hpp │ │ ├── base_std_math.hpp │ │ ├── base_to_string.hpp │ │ ├── bender_quad.hpp │ │ ├── bool_fun.hpp │ │ ├── bool_valued.hpp │ │ ├── capacity_order.hpp │ │ ├── check_for_nan.hpp │ │ ├── chkpoint_one │ │ │ ├── chkpoint_one.hpp │ │ │ ├── ctor.hpp │ │ │ ├── for_sparse_jac.hpp │ │ │ ├── forward.hpp │ │ │ ├── rev_sparse_hes.hpp │ │ │ ├── rev_sparse_jac.hpp │ │ │ ├── reverse.hpp │ │ │ ├── set_hes_sparse_bool.hpp │ │ │ ├── set_hes_sparse_set.hpp │ │ │ ├── set_jac_sparse_bool.hpp │ │ │ └── set_jac_sparse_set.hpp │ │ ├── chkpoint_two │ │ │ ├── chkpoint_two.hpp │ │ │ ├── ctor.hpp │ │ │ ├── dynamic.hpp │ │ │ ├── for_type.hpp │ │ │ ├── forward.hpp │ │ │ ├── hes_sparsity.hpp │ │ │ ├── jac_sparsity.hpp │ │ │ ├── rev_depend.hpp │ │ │ └── reverse.hpp │ │ ├── compare.hpp │ │ ├── compound_assign.hpp │ │ ├── con_dyn_var.hpp │ │ ├── cond_exp.hpp │ │ ├── convert.hpp │ │ ├── cppad_assert.hpp │ │ ├── dependent.hpp │ │ ├── discrete.hpp │ │ ├── div.hpp │ │ ├── div_eq.hpp │ │ ├── drivers.hpp │ │ ├── epsilon.hpp │ │ ├── equal_op_seq.hpp │ │ ├── erf.hpp │ │ ├── erfc.hpp │ │ ├── expm1.hpp │ │ ├── for_hes_sparsity.hpp │ │ ├── for_jac_sparsity.hpp │ │ ├── for_one.hpp │ │ ├── for_sparse_hes.hpp │ │ ├── for_sparse_jac.hpp │ │ ├── for_two.hpp │ │ ├── forward.hpp │ │ ├── fun_check.hpp │ │ ├── fun_construct.hpp │ │ ├── fun_eval.hpp │ │ ├── graph │ │ │ ├── cpp_graph.hpp │ │ │ ├── from_graph.hpp │ │ │ ├── from_json.hpp │ │ │ ├── graph_op_enum.hpp │ │ │ ├── to_graph.hpp │ │ │ └── to_json.hpp │ │ ├── hash_code.hpp │ │ ├── hessian.hpp │ │ ├── identical.hpp │ │ ├── independent.hpp │ │ ├── integer.hpp │ │ ├── jacobian.hpp │ │ ├── log1p.hpp │ │ ├── lu_ratio.hpp │ │ ├── mul.hpp │ │ ├── mul_eq.hpp │ │ ├── near_equal_ext.hpp │ │ ├── new_dynamic.hpp │ │ ├── num_skip.hpp │ │ ├── numeric_limits.hpp │ │ ├── omp_max_thread.hpp │ │ ├── opt_val_hes.hpp │ │ ├── optimize.hpp │ │ ├── ordered.hpp │ │ ├── parallel_ad.hpp │ │ ├── pow.hpp │ │ ├── print_for.hpp │ │ ├── rev_hes_sparsity.hpp │ │ ├── rev_jac_sparsity.hpp │ │ ├── rev_one.hpp │ │ ├── rev_sparse_hes.hpp │ │ ├── rev_sparse_jac.hpp │ │ ├── rev_two.hpp │ │ ├── reverse.hpp │ │ ├── sign.hpp │ │ ├── sparse.hpp │ │ ├── sparse_hes.hpp │ │ ├── sparse_hessian.hpp │ │ ├── sparse_jac.hpp │ │ ├── sparse_jacobian.hpp │ │ ├── standard_math.hpp │ │ ├── std_math_98.hpp │ │ ├── sub.hpp │ │ ├── sub_eq.hpp │ │ ├── subgraph_jac_rev.hpp │ │ ├── subgraph_reverse.hpp │ │ ├── subgraph_sparsity.hpp │ │ ├── tape_link.hpp │ │ ├── test_vector.hpp │ │ ├── testvector.hpp │ │ ├── unary_minus.hpp │ │ ├── unary_plus.hpp │ │ ├── undef.hpp │ │ ├── user_ad.hpp │ │ ├── value.hpp │ │ ├── var2par.hpp │ │ ├── vec_ad.hpp │ │ └── zdouble.hpp │ ├── cppad.hpp │ ├── epl-2.0.txt │ ├── example │ │ ├── atomic_three │ │ │ └── mat_mul.hpp │ │ ├── atomic_two │ │ │ ├── eigen_cholesky.hpp │ │ │ ├── eigen_mat_inv.hpp │ │ │ └── eigen_mat_mul.hpp │ │ ├── base_adolc.hpp │ │ ├── cppad_eigen.hpp │ │ ├── eigen_cholesky.hpp │ │ ├── eigen_mat_inv.hpp │ │ ├── eigen_mat_mul.hpp │ │ ├── eigen_plugin.hpp │ │ └── mat_mul.hpp │ ├── ipopt │ │ ├── solve.hpp │ │ ├── solve_callback.hpp │ │ └── solve_result.hpp │ ├── local │ │ ├── abs_op.hpp │ │ ├── acos_op.hpp │ │ ├── acosh_op.hpp │ │ ├── ad_tape.hpp │ │ ├── add_op.hpp │ │ ├── asin_op.hpp │ │ ├── asinh_op.hpp │ │ ├── atan_op.hpp │ │ ├── atanh_op.hpp │ │ ├── atom_state.hpp │ │ ├── atomic_index.hpp │ │ ├── color_general.hpp │ │ ├── color_symmetric.hpp │ │ ├── comp_op.hpp │ │ ├── cond_op.hpp │ │ ├── cos_op.hpp │ │ ├── cosh_op.hpp │ │ ├── cppad_colpack.hpp │ │ ├── cskip_op.hpp │ │ ├── csum_op.hpp │ │ ├── declare_ad.hpp │ │ ├── define.hpp │ │ ├── discrete_op.hpp │ │ ├── div_op.hpp │ │ ├── erf_op.hpp │ │ ├── exp_op.hpp │ │ ├── expm1_op.hpp │ │ ├── graph │ │ │ ├── cpp_graph_itr.hpp │ │ │ ├── cpp_graph_op.hpp │ │ │ ├── json_lexer.hpp │ │ │ ├── json_parser.hpp │ │ │ └── json_writer.hpp │ │ ├── hash_code.hpp │ │ ├── independent.hpp │ │ ├── is_pod.hpp │ │ ├── load_op.hpp │ │ ├── log1p_op.hpp │ │ ├── log_op.hpp │ │ ├── mul_op.hpp │ │ ├── op.hpp │ │ ├── op_code.hpp │ │ ├── op_code_dyn.hpp │ │ ├── op_code_var.hpp │ │ ├── optimize │ │ │ ├── cexp_info.hpp │ │ │ ├── csum_op_info.hpp │ │ │ ├── csum_stacks.hpp │ │ │ ├── get_cexp_info.hpp │ │ │ ├── get_dyn_previous.hpp │ │ │ ├── get_op_previous.hpp │ │ │ ├── get_op_usage.hpp │ │ │ ├── get_par_usage.hpp │ │ │ ├── hash_code.hpp │ │ │ ├── match_op.hpp │ │ │ ├── optimize_run.hpp │ │ │ ├── record_csum.hpp │ │ │ ├── record_pv.hpp │ │ │ ├── record_vp.hpp │ │ │ ├── record_vv.hpp │ │ │ ├── size_pair.hpp │ │ │ └── usage.hpp │ │ ├── parameter_op.hpp │ │ ├── play │ │ │ ├── addr_enum.hpp │ │ │ ├── atom_op_info.hpp │ │ │ ├── player.hpp │ │ │ ├── random_iterator.hpp │ │ │ ├── random_setup.hpp │ │ │ ├── sequential_iterator.hpp │ │ │ └── subgraph_iterator.hpp │ │ ├── pod_vector.hpp │ │ ├── pow_op.hpp │ │ ├── print_op.hpp │ │ ├── prototype_op.hpp │ │ ├── record │ │ │ ├── comp_op.hpp │ │ │ ├── cond_exp.hpp │ │ │ ├── put_dyn_atomic.hpp │ │ │ ├── put_var_atomic.hpp │ │ │ └── recorder.hpp │ │ ├── recorder.hpp │ │ ├── set_get_in_parallel.hpp │ │ ├── sign_op.hpp │ │ ├── sin_op.hpp │ │ ├── sinh_op.hpp │ │ ├── sparse │ │ │ ├── binary_op.hpp │ │ │ ├── internal.hpp │ │ │ ├── list_setvec.hpp │ │ │ ├── pack_setvec.hpp │ │ │ ├── svec_setvec.hpp │ │ │ └── unary_op.hpp │ │ ├── sparse_binary_op.hpp │ │ ├── sparse_internal.hpp │ │ ├── sparse_list.hpp │ │ ├── sparse_pack.hpp │ │ ├── sparse_sizevec.hpp │ │ ├── sparse_unary_op.hpp │ │ ├── sqrt_op.hpp │ │ ├── std_set.hpp │ │ ├── store_op.hpp │ │ ├── sub_op.hpp │ │ ├── subgraph │ │ │ ├── arg_variable.hpp │ │ │ ├── entire_call.hpp │ │ │ ├── get_rev.hpp │ │ │ ├── info.hpp │ │ │ ├── init_rev.hpp │ │ │ └── sparsity.hpp │ │ ├── sweep │ │ │ ├── call_atomic.hpp │ │ │ ├── dynamic.hpp │ │ │ ├── for_hes.hpp │ │ │ ├── for_jac.hpp │ │ │ ├── forward0.hpp │ │ │ ├── forward1.hpp │ │ │ ├── forward2.hpp │ │ │ ├── rev_hes.hpp │ │ │ ├── rev_jac.hpp │ │ │ └── reverse.hpp │ │ ├── tan_op.hpp │ │ ├── tanh_op.hpp │ │ ├── utility │ │ │ ├── cppad_vector_itr.hpp │ │ │ └── vector_bool.hpp │ │ └── zmul_op.hpp │ ├── speed │ │ ├── det_33.hpp │ │ ├── det_by_lu.hpp │ │ ├── det_by_minor.hpp │ │ ├── det_grad_33.hpp │ │ ├── det_of_minor.hpp │ │ ├── mat_sum_sq.hpp │ │ ├── ode_evaluate.hpp │ │ ├── sparse_hes_fun.hpp │ │ ├── sparse_jac_fun.hpp │ │ └── uniform_01.hpp │ ├── utility.hpp │ ├── utility │ │ ├── check_numeric_type.hpp │ │ ├── check_simple_vector.hpp │ │ ├── elapsed_seconds.hpp │ │ ├── error_handler.hpp │ │ ├── index_sort.hpp │ │ ├── lu_factor.hpp │ │ ├── lu_invert.hpp │ │ ├── lu_solve.hpp │ │ ├── memory_leak.hpp │ │ ├── nan.hpp │ │ ├── near_equal.hpp │ │ ├── ode_err_control.hpp │ │ ├── ode_gear.hpp │ │ ├── ode_gear_control.hpp │ │ ├── omp_alloc.hpp │ │ ├── poly.hpp │ │ ├── pow_int.hpp │ │ ├── romberg_mul.hpp │ │ ├── romberg_one.hpp │ │ ├── rosen_34.hpp │ │ ├── runge_45.hpp │ │ ├── set_union.hpp │ │ ├── sparse2eigen.hpp │ │ ├── sparse_rc.hpp │ │ ├── sparse_rcv.hpp │ │ ├── speed_test.hpp │ │ ├── test_boolofvoid.hpp │ │ ├── thread_alloc.hpp │ │ ├── time_test.hpp │ │ ├── to_string.hpp │ │ ├── track_new_del.hpp │ │ ├── vector.hpp │ │ └── vector_bool.hpp │ └── wno_conversion.hpp └── iit │ └── rbd │ ├── InertiaMatrix.h │ ├── StateDependentBase.h │ ├── StateDependentMatrix.h │ ├── TransformsBase.h │ ├── eigen_traits.h │ ├── internals.h │ ├── rbd.h │ ├── robcogen_commons.h │ ├── traits │ ├── CppADCodegenTrait.h │ ├── DoubleTrait.h │ ├── FloatTrait.h │ └── TraitSelector.h │ ├── types.h │ └── utils.h └── package.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | jenkins-pipeline merge-ours -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/doc.yaml: -------------------------------------------------------------------------------- 1 | name: Generate and Publish Documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build-and-deploy: 10 | runs-on: ubuntu-20.04 11 | 12 | container: 13 | image: registry.leggedrobotics.com/ocs2/doc 14 | credentials: 15 | username: ${{ secrets.REGISTRY_USERNAME }} 16 | password: ${{ secrets.REGISTRY_PASSWORD }} 17 | 18 | steps: 19 | - name: Checkout 🛎️ 20 | uses: actions/checkout@v2.3.1 21 | 22 | - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. 23 | run: | 24 | cd ocs2_doc 25 | mkdir -p build && cd build 26 | cmake .. 27 | make 28 | 29 | - name: Deploy 🚀 30 | uses: JamesIves/github-pages-deploy-action@4.1.4 31 | with: 32 | branch: gh-pages # The branch the action should deploy to. 33 | folder: ocs2_doc/build/output/sphinx # The folder the action should deploy. 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeFiles/ 2 | CMakeCache.txt 3 | *.a 4 | *.o 5 | *.so 6 | Makefile 7 | .project 8 | .idea/ 9 | .cproject 10 | *~ 11 | *.settings* 12 | */doc/html/ 13 | Doxyfile 14 | *.orig 15 | *.tag 16 | *.tmp 17 | *.swp 18 | __pycache__ 19 | *.pyc 20 | *.pydevproject 21 | ocs2_core/test/cppad_cg/testCppADCG_generated/ 22 | ocs2_ddp/test/ddp_test_generated/ 23 | *.aux 24 | *.log 25 | *.out 26 | *.synctex.gz 27 | .vscode/ 28 | runs/ 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OCS2 Toolbox 2 | 3 | ## Summary 4 | OCS2 is a C++ toolbox tailored for Optimal Control for Switched Systems (OCS2). The toolbox provides an efficient implementation of the following algorith 5 | 6 | * SLQ: Continuous-time domin DDP 7 | * iLQR: Discrete-time domain DDP 8 | * SQP: Multiple-shooting algorithm based on HPIPM 9 | * PISOC: Path integral stochatic optimal control 10 | 11 | ![legged-robot](https://leggedrobotics.github.io/ocs2/_static/gif/legged_robot.gif) 12 | 13 | OCS2 handles general path constraints through Augmented Lagrangian or relaxed barrier methods. To facilitate the application of OCS2 in robotic tasks, it provides the user with additional tools to set up the system dynamics (such as kinematic or dynamic models) and cost/constraints (such as self-collision avoidance and end-effector tracking) from a URDF model. The library also provides an automatic differentiation tool to calculate derivatives of the system dynamics, constraints, and cost. To facilitate its deployment on robotic platforms, the OCS2 provides tools for ROS interfaces. The toolbox’s efficient and numerically stable implementations in conjunction with its user-friendly interface have paved the way for employing it on numerous robotic applications with limited onboard computation power. 14 | 15 | For more information refer to the project's [Documentation Page](https://leggedrobotics.github.io/ocs2/) 16 | -------------------------------------------------------------------------------- /jenkins-pipeline: -------------------------------------------------------------------------------- 1 | library 'continuous_integration_pipeline' 2 | ciPipeline("--ros-distro noetic --publish-doxygen --recipes onnxruntime raisimlib\ 3 | --dependencies 'git@github.com:leggedrobotics/hpp-fcl.git;master;git'\ 4 | 'git@github.com:leggedrobotics/pinocchio.git;master;git'\ 5 | 'git@github.com:leggedrobotics/ocs2_robotic_assets.git;main;git'\ 6 | 'git@github.com:leggedrobotics/elevation_mapping_cupy.git;main;git'\ 7 | 'git@github.com:ANYbotics/grid_map.git;master;git'\ 8 | --ignore ocs2_doc") 9 | 10 | node { 11 | stage('Artifacts') { 12 | archiveArtifacts artifacts: 'build/ocs2_**/log/*.log', allowEmptyArchive: true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ocs2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(ocs2) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | 6 | -------------------------------------------------------------------------------- /ocs2/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2 4 | 1.0.0 5 | Metapackage for OCS2 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | BSD3 11 | 12 | catkin 13 | ocs2_core 14 | ocs2_mpc 15 | ocs2_frank_wolfe 16 | ocs2_oc 17 | ocs2_qp_solver 18 | ocs2_ddp 19 | ocs2_slp 20 | ocs2_sqp 21 | ocs2_ros_interfaces 22 | ocs2_python_interface 23 | ocs2_pinocchio 24 | ocs2_robotic_tools 25 | ocs2_perceptive 26 | ocs2_robotic_examples 27 | ocs2_thirdparty 28 | ocs2_raisim 29 | ocs2_mpcnet 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ocs2_core/cmake/ocs2_cxx_flags.cmake: -------------------------------------------------------------------------------- 1 | # The list of compiler flags used in ocs2 can be prefixed with catkin config 2 | # Addition flags are to be separated by \; 3 | # For example, to turn on architecture specific optimizations: 4 | # catkin config --cmake-args -DOCS2_CXX_FLAGS=-march=native\;-mtune=native 5 | list(APPEND OCS2_CXX_FLAGS 6 | "-pthread" 7 | "-Wfatal-errors" 8 | "-Wl,--no-as-needed" 9 | ) 10 | 11 | # Force Boost dynamic linking 12 | list(APPEND OCS2_CXX_FLAGS 13 | "-DBOOST_ALL_DYN_LINK" 14 | ) 15 | 16 | # Add OpenMP flags 17 | if (NOT DEFINED OpenMP_CXX_FOUND) 18 | find_package(OpenMP REQUIRED) 19 | endif (NOT DEFINED OpenMP_CXX_FOUND) 20 | list(APPEND OCS2_CXX_FLAGS 21 | ${OpenMP_CXX_FLAGS} 22 | ) 23 | 24 | # Cpp standard version 25 | set(CMAKE_CXX_STANDARD 14) 26 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 27 | -------------------------------------------------------------------------------- /ocs2_core/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_core 4 | 0.0.0 5 | The ocs2_core package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD 12 | 13 | catkin 14 | cmake_modules 15 | cmake_clang_tools 16 | 17 | ocs2_thirdparty 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocs2_core/test/control/testFeedforwardController.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | using namespace ocs2; 6 | 7 | TEST(testFeedforwardController, testSerialization) { 8 | scalar_array_t time = {0.0, 1.0}; 9 | vector_array_t uff = {vector_t::Random(2), vector_t::Random(2)}; 10 | FeedforwardController controller(time, uff); 11 | 12 | std::vector> data(2); 13 | std::vector*> dataPtr{&data[0], &data[1]}; 14 | std::vector const*> dataPtrConst{&data[0], &data[1]}; 15 | 16 | controller.flatten(time, dataPtr); 17 | 18 | auto controllerOut = FeedforwardController::unFlatten(time, dataPtrConst); 19 | 20 | for (int k = 0; k < time.size(); k++) { 21 | EXPECT_NEAR(controller.timeStamp_[k], controllerOut.timeStamp_[k], 1e-6); 22 | EXPECT_TRUE(controller.uffArray_[k].isApprox(controllerOut.uffArray_[k], 1e-6)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ocs2_core/test/control/testLinearController.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | using namespace ocs2; 6 | 7 | TEST(testLinearController, testSerialization) { 8 | scalar_array_t time = {0.0, 1.0}; 9 | vector_array_t bias = {vector_t::Random(2), vector_t::Random(2)}; 10 | matrix_array_t gain = {matrix_t::Random(2, 3), matrix_t::Random(2, 3)}; 11 | LinearController controller(time, bias, gain); 12 | 13 | std::vector> data(2); 14 | std::vector*> dataPtr{&data[0], &data[1]}; 15 | std::vector const*> dataPtrConst{&data[0], &data[1]}; 16 | 17 | controller.flatten(time, dataPtr); 18 | 19 | auto controllerOut = LinearController::unFlatten({3, 3}, {2, 2}, time, dataPtrConst); 20 | 21 | for (int k = 0; k < time.size(); k++) { 22 | EXPECT_NEAR(controller.timeStamp_[k], controllerOut.timeStamp_[k], 1e-6); 23 | EXPECT_TRUE(controller.gainArray_[k].isApprox(controllerOut.gainArray_[k], 1e-6)); 24 | EXPECT_TRUE(controller.biasArray_[k].isApprox(controllerOut.biasArray_[k], 1e-6)); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ocs2_core/test/loopshaping/loopshaping_r.conf: -------------------------------------------------------------------------------- 1 | r_filter 2 | { 3 | numFilters 2; 4 | 5 | Filter0; Empty filter 6 | { 7 | numRepeats 1; 8 | numZeros 0; 9 | numPoles 0; 10 | scaling 1; 11 | } 12 | 13 | Filter1; Filter for u0, u1 14 | { 15 | numRepeats 2; 16 | numPoles 2; 17 | numZeros 2; 18 | scaling 1; 19 | zeros 20 | { 21 | (0) -200.0; 22 | (1) -200.0; 23 | } 24 | poles 25 | { 26 | (0) -100.0; 27 | (1) -400.0; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ocs2_core/test/loopshaping/loopshaping_r_ballbot.conf: -------------------------------------------------------------------------------- 1 | r_filter 2 | { 3 | numFilters 2; 4 | 5 | Filter0; Filter for u0 u1 u2 6 | { 7 | numRepeats 3; 8 | numPoles 1; 9 | numZeros 1; 10 | scaling 1; 11 | zeros 12 | { 13 | (0) -100.0; 14 | } 15 | poles 16 | { 17 | (0) -200.0; 18 | } 19 | } 20 | 21 | Filter1; Filter for the arm inputs 22 | { 23 | numRepeats 3; 24 | numPoles 0; 25 | numZeros 0; 26 | scaling 1; 27 | } 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ocs2_core/test/loopshaping/loopshaping_s.conf: -------------------------------------------------------------------------------- 1 | s_inv_filter 2 | { 3 | numFilters 2; 4 | 5 | Filter0; Empty filter 6 | { 7 | numRepeats 1; 8 | numZeros 0; 9 | numPoles 0; 10 | scaling 1; 11 | } 12 | 13 | Filter1; Filter for u0, u1 14 | { 15 | numRepeats 2; 16 | numPoles 2; 17 | numZeros 2; 18 | scaling 1; 19 | zeros 20 | { 21 | (0) -200.0; 22 | (1) -200.0; 23 | } 24 | poles 25 | { 26 | (0) -100.0; 27 | (1) -400.0; 28 | } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /ocs2_core/test/loopshaping/loopshaping_s_integrator.conf: -------------------------------------------------------------------------------- 1 | s_inv_filter 2 | { 3 | numFilters 1; 4 | 5 | Filter0; 6 | { 7 | numRepeats 1; 8 | numPoles 0; 9 | numZeros 1; 10 | scaling 100; 11 | zeros 12 | { 13 | (0) 0.0; 14 | } 15 | poles 16 | { 17 | (0) -100.0; 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /ocs2_core/test/misc/data/pairVectors.info: -------------------------------------------------------------------------------- 1 | stringPairs { 2 | [0] "s1, s2" 3 | [1] "s3, s4" 4 | } 5 | 6 | sizePairs { 7 | [0] "1, 2" 8 | [1] "3, 4" 9 | } 10 | 11 | stringScalarPairs { 12 | [0] "s1, 2.1" 13 | [1] "s3, 4.3" 14 | } 15 | 16 | stringSizePairs { 17 | [0] "s1, 2" 18 | [1] "s3, 4" 19 | } -------------------------------------------------------------------------------- /ocs2_ddp/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_ddp 4 | 0.0.0 5 | The ocs2_ddp package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD 12 | 13 | catkin 14 | cmake_modules 15 | cmake_clang_tools 16 | ocs2_qp_solver 17 | ocs2_core 18 | ocs2_oc 19 | ocs2_mpc 20 | 21 | 22 | -------------------------------------------------------------------------------- /ocs2_ddp/src/lintTarget.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | // Riccati equations 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | // dummy target for clang toolchain 16 | int main() { 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /ocs2_doc/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | venv 3 | -------------------------------------------------------------------------------- /ocs2_doc/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:noetic 2 | 3 | RUN apt-get update \ 4 | && apt-get upgrade -y \ 5 | && apt-get install -y \ 6 | doxygen \ 7 | python3-pip \ 8 | git \ 9 | rsync \ 10 | wget \ 11 | curl 12 | 13 | RUN pip3 install \ 14 | sphinx \ 15 | breathe \ 16 | sphinx-rtd-theme \ 17 | sphinxcontrib.bibtex 18 | -------------------------------------------------------------------------------- /ocs2_doc/cmake/FindSphinx.cmake: -------------------------------------------------------------------------------- 1 | # Look for an executable called sphinx-build 2 | find_program(SPHINX_EXECUTABLE 3 | NAMES sphinx-build 4 | DOC "Path to sphinx-build executable") 5 | 6 | include(FindPackageHandleStandardArgs) 7 | 8 | # Handle standard arguments to find_package like REQUIRED and QUIET 9 | find_package_handle_standard_args(Sphinx 10 | "Failed to find sphinx-build executable" 11 | SPHINX_EXECUTABLE) 12 | -------------------------------------------------------------------------------- /ocs2_doc/docs/faq.rst: -------------------------------------------------------------------------------- 1 | .. index:: pair: page; Frequently Asked Questions 2 | 3 | .. _doxid-ocs2_doc_faq: 4 | 5 | Frequently Asked Questions 6 | ========================== 7 | 8 | 9 | At runtime, I receive warnings on setting thread priority 10 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11 | 12 | The priority of a thread affects how the thread is scheduled by the OS. 13 | A higher priority thread is likely to be scheduled more often and lowers 14 | the latency of its execution. 15 | 16 | We can set the thread priority for the solver through the `threadPriority` 17 | attribute in the `task.info` file. This is set to `50` in the 18 | provided robotic examples. 19 | 20 | Normal users cannot set priorities higher than `0` by default. To allow 21 | your linux user account to do so, you need to append the following 22 | entries to the `/etc/security/limits.conf` file (replacing with 23 | your username): 24 | 25 | .. code-block:: 26 | 27 | - rtprio 99 28 | - nice -20 29 | 30 | To allow your entire group to set higher priorities, append (replacing 31 | with the created group name): 32 | 33 | .. code-block:: 34 | 35 | @ - rtprio 99 36 | @ - nice -20 37 | 38 | -------------------------------------------------------------------------------- /ocs2_doc/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. include:: intro.rst 2 | 3 | Table of Contents 4 | ----------------- 5 | 6 | .. toctree:: 7 | overview.rst 8 | installation.rst 9 | getting-started.rst 10 | optimal_control_modules.rst 11 | robotic_examples.rst 12 | from_urdf_to_ocp.rst 13 | profiling.rst 14 | mpcnet.rst 15 | faq.rst 16 | 17 | .. rubric:: Reference and Index: 18 | 19 | :ref:`genindex` 20 | 21 | -------------------------------------------------------------------------------- /ocs2_doc/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_doc 4 | 1.0.0 5 | Documentation for OCS2 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD 12 | 13 | catkin 14 | 15 | doxygen 16 | texlive-latex-base 17 | 18 | ocs2_core 19 | ocs2_frank_wolfe 20 | ocs2_oc 21 | ocs2_mpc 22 | ocs2_ddp 23 | ocs2_sqp 24 | ocs2_python_interface 25 | ocs2_ros_interfaces 26 | ocs2_robotic_tools 27 | ocs2_robotic_examples 28 | ocs2_pinocchio 29 | 30 | -------------------------------------------------------------------------------- /ocs2_doc/readme.md: -------------------------------------------------------------------------------- 1 | OCS2 Documentation Tools 2 | ======================== 3 | 4 | Consists of the following parts: 5 | 6 | - **Doxygen** to introspect the C++ code and generate XML output 7 | - **Breathe** to convert Doxygen's XML output to a Sphinx readable format 8 | - **Sphinx** to do the actual generation of the documentation 9 | 10 | Updating the Docker documentation environment 11 | --------------------------------------------- 12 | 13 | GitHub actions pulls the Docker documentation environment from the RSL Harbor _hub_ (https://registry.leggedrobotics.com/). 14 | 15 | ``` 16 | # in the ocs2_doc directory, where `Dockerfile` resides. 17 | docker build -t registry.leggedrobotics.com/ocs2/doc . 18 | # you need push access to `https://registry.leggedrobotics.com/` 19 | docker push registry.leggedrobotics.com/ocs2/doc 20 | ``` 21 | -------------------------------------------------------------------------------- /ocs2_doc/tools/doxygen/.gitignore: -------------------------------------------------------------------------------- 1 | ocs2_doc_doxyfile 2 | -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/ballbot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/ballbot.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/cartpole.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/cartpole.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/double_integrator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/double_integrator.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/legged_robot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/legged_robot.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/franka.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/franka.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/kinova_j2n6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/kinova_j2n6.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/kinova_j2n7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/kinova_j2n7.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/mabi_mobile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/mabi_mobile.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/pr2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/pr2.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/ridgeback_ur5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/mobile_manipulator/ridgeback_ur5.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/gif/quadrotor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/gif/quadrotor.gif -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/img/GitHub-Mark-120px-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/img/GitHub-Mark-120px-plus.png -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/img/jumping_goat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/img/jumping_goat.jpg -------------------------------------------------------------------------------- /ocs2_doc/tools/sphinx/_static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_doc/tools/sphinx/_static/img/logo.png -------------------------------------------------------------------------------- /ocs2_ipm/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_ipm 4 | 0.0.0 5 | The ocs2_ipm package 6 | 7 | Sotaro Katayama 8 | 9 | BSD-3 10 | 11 | catkin 12 | ocs2_core 13 | ocs2_mpc 14 | ocs2_oc 15 | blasfeo_catkin 16 | hpipm_catkin 17 | ocs2_qp_solver 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocs2_mpc/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_mpc 4 | 0.0.0 5 | Model Predictive Control for SLQ 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD3 12 | 13 | catkin 14 | cmake_modules 15 | cmake_clang_tools 16 | ocs2_core 17 | ocs2_oc 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_mpc/src/lintTarget.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | // dummy target for clang toolchain 10 | int main() { 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_ballbot_mpcnet/launch/ballbot_mpcnet.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_ballbot_mpcnet/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_ballbot_mpcnet 4 | 0.0.0 5 | The ocs2_ballbot_mpcnet package 6 | 7 | Alexander Reske 8 | 9 | Farbod Farshidian 10 | Alexander Reske 11 | 12 | BSD-3 13 | 14 | catkin 15 | 16 | cmake_clang_tools 17 | 18 | ocs2_ballbot 19 | ocs2_ballbot_ros 20 | ocs2_mpcnet_core 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_ballbot_mpcnet/policy/ballbot.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_mpcnet/ocs2_ballbot_mpcnet/policy/ballbot.onnx -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_ballbot_mpcnet/policy/ballbot.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_mpcnet/ocs2_ballbot_mpcnet/policy/ballbot.pt -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_ballbot_mpcnet/python/ocs2_ballbot_mpcnet/__init__.py: -------------------------------------------------------------------------------- 1 | from ocs2_ballbot_mpcnet.BallbotMpcnetPybindings import MpcnetInterface 2 | from ocs2_ballbot_mpcnet.mpcnet import BallbotMpcnet 3 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_ballbot_mpcnet/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | setup_args = generate_distutils_setup(packages=["ocs2_ballbot_mpcnet"], package_dir={"": "python"}) 7 | 8 | setup(**setup_args) 9 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_legged_robot_mpcnet/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_legged_robot_mpcnet 4 | 0.0.0 5 | The ocs2_legged_robot_mpcnet package 6 | 7 | Alexander Reske 8 | 9 | Farbod Farshidian 10 | Alexander Reske 11 | 12 | BSD-3 13 | 14 | catkin 15 | 16 | cmake_clang_tools 17 | 18 | ocs2_legged_robot 19 | ocs2_legged_robot_raisim 20 | ocs2_legged_robot_ros 21 | ocs2_mpcnet_core 22 | 23 | 24 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_legged_robot_mpcnet/policy/legged_robot.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_mpcnet/ocs2_legged_robot_mpcnet/policy/legged_robot.onnx -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_legged_robot_mpcnet/policy/legged_robot.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_mpcnet/ocs2_legged_robot_mpcnet/policy/legged_robot.pt -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_legged_robot_mpcnet/python/ocs2_legged_robot_mpcnet/__init__.py: -------------------------------------------------------------------------------- 1 | from ocs2_legged_robot_mpcnet.LeggedRobotMpcnetPybindings import MpcnetInterface 2 | from ocs2_legged_robot_mpcnet.mpcnet import LeggedRobotMpcnet 3 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_legged_robot_mpcnet/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | setup_args = generate_distutils_setup(packages=["ocs2_legged_robot_mpcnet"], package_dir={"": "python"}) 7 | 8 | setup(**setup_args) 9 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(ocs2_mpcnet) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_mpcnet 4 | 0.0.0 5 | The ocs2_mpcnet metapackage 6 | 7 | Alexander Reske 8 | 9 | Farbod Farshidian 10 | Alexander Reske 11 | 12 | BSD-3 13 | 14 | catkin 15 | 16 | ocs2_mpcnet_core 17 | ocs2_ballbot_mpcnet 18 | ocs2_legged_robot_mpcnet 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/misc/onnxruntime/cmake/onnxruntimeVersion.cmake: -------------------------------------------------------------------------------- 1 | # Custom cmake version file 2 | 3 | set(PACKAGE_VERSION "1.7.0") 4 | 5 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 6 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 7 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 8 | else() 9 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 10 | if("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 11 | set(PACKAGE_VERSION_EXACT TRUE) 12 | endif() 13 | endif() 14 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_mpcnet_core 4 | 0.0.0 5 | The ocs2_mpcnet_core package 6 | 7 | Alexander Reske 8 | 9 | Farbod Farshidian 10 | Alexander Reske 11 | 12 | BSD-3 13 | 14 | catkin 15 | 16 | cmake_clang_tools 17 | 18 | pybind11_catkin 19 | 20 | ocs2_mpc 21 | ocs2_python_interface 22 | ocs2_ros_interfaces 23 | 24 | 25 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/python/ocs2_mpcnet_core/__init__.py: -------------------------------------------------------------------------------- 1 | from ocs2_mpcnet_core.MpcnetPybindings import size_array, scalar_array, vector_array, matrix_array 2 | from ocs2_mpcnet_core.MpcnetPybindings import ScalarFunctionQuadraticApproximation 3 | from ocs2_mpcnet_core.MpcnetPybindings import SystemObservation, SystemObservationArray 4 | from ocs2_mpcnet_core.MpcnetPybindings import ModeSchedule, ModeScheduleArray 5 | from ocs2_mpcnet_core.MpcnetPybindings import TargetTrajectories, TargetTrajectoriesArray 6 | from ocs2_mpcnet_core.MpcnetPybindings import DataPoint, DataArray 7 | from ocs2_mpcnet_core.MpcnetPybindings import Metrics, MetricsArray 8 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/python/ocs2_mpcnet_core/loss/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import BaseLoss 2 | from .behavioral_cloning import BehavioralCloningLoss 3 | from .cross_entropy import CrossEntropyLoss 4 | from .hamiltonian import HamiltonianLoss 5 | 6 | __all__ = ["BaseLoss", "BehavioralCloningLoss", "CrossEntropyLoss", "HamiltonianLoss"] 7 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/python/ocs2_mpcnet_core/memory/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import BaseMemory 2 | from .circular import CircularMemory 3 | 4 | __all__ = ["BaseMemory", "CircularMemory"] 5 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/python/ocs2_mpcnet_core/policy/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import BasePolicy 2 | from .linear import LinearPolicy 3 | from .mixture_of_linear_experts import MixtureOfLinearExpertsPolicy 4 | from .mixture_of_nonlinear_experts import MixtureOfNonlinearExpertsPolicy 5 | from .nonlinear import NonlinearPolicy 6 | 7 | __all__ = [ 8 | "BasePolicy", 9 | "LinearPolicy", 10 | "MixtureOfLinearExpertsPolicy", 11 | "MixtureOfNonlinearExpertsPolicy", 12 | "NonlinearPolicy", 13 | ] 14 | -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | ####### requirements.txt ####### 3 | # 4 | ###### Requirements without version specifiers ###### 5 | black 6 | numpy 7 | pyyaml 8 | tensorboard 9 | torch 10 | # 11 | ###### Requirements with version specifiers ###### 12 | # 13 | ###### Refer to other requirements files ###### 14 | # -------------------------------------------------------------------------------- /ocs2_mpcnet/ocs2_mpcnet_core/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | setup_args = generate_distutils_setup(packages=["ocs2_mpcnet_core"], package_dir={"": "python"}) 7 | 8 | setup(**setup_args) 9 | -------------------------------------------------------------------------------- /ocs2_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(ocs2_msgs) 3 | 4 | find_package(catkin REQUIRED 5 | COMPONENTS 6 | std_msgs 7 | message_generation 8 | ) 9 | 10 | add_message_files( 11 | FILES 12 | mpc_state.msg 13 | mpc_input.msg 14 | mode_schedule.msg 15 | mpc_observation.msg 16 | mpc_performance_indices.msg 17 | mpc_target_trajectories.msg 18 | controller_data.msg 19 | mpc_flattened_controller.msg 20 | lagrangian_metrics.msg 21 | multiplier.msg 22 | constraint.msg 23 | ) 24 | 25 | add_service_files( 26 | FILES 27 | reset.srv 28 | ) 29 | 30 | generate_messages( 31 | DEPENDENCIES 32 | std_msgs 33 | ) 34 | 35 | catkin_package( 36 | CATKIN_DEPENDS 37 | std_msgs 38 | message_runtime 39 | ) 40 | -------------------------------------------------------------------------------- /ocs2_msgs/msg/constraint.msg: -------------------------------------------------------------------------------- 1 | # MPC constraint 2 | 3 | float32 time 4 | float32[] value -------------------------------------------------------------------------------- /ocs2_msgs/msg/controller_data.msg: -------------------------------------------------------------------------------- 1 | float32[] data 2 | -------------------------------------------------------------------------------- /ocs2_msgs/msg/lagrangian_metrics.msg: -------------------------------------------------------------------------------- 1 | # MPC Lagrangian metrics 2 | 3 | float32 time 4 | float32 penalty 5 | float32[] constraint -------------------------------------------------------------------------------- /ocs2_msgs/msg/mode_schedule.msg: -------------------------------------------------------------------------------- 1 | # MPC mode sequence 2 | 3 | float64[] eventTimes # event times: its size is equal to the size of phaseSequence minus one 4 | int8[] modeSequence # mode sequence: e.g., for a quadrupedal robot, it is in the set {0, 1,..., 15} -------------------------------------------------------------------------------- /ocs2_msgs/msg/mpc_flattened_controller.msg: -------------------------------------------------------------------------------- 1 | # Flattened controller: A serialized controller 2 | 3 | # define controllerType Enum values 4 | uint8 CONTROLLER_UNKNOWN=0 # safety mechanism: message initalization to zero 5 | uint8 CONTROLLER_FEEDFORWARD=1 6 | uint8 CONTROLLER_LINEAR=2 7 | 8 | uint8 controllerType # what type of controller is this 9 | 10 | mpc_observation initObservation # plan initial observation 11 | 12 | mpc_target_trajectories planTargetTrajectories # target trajectory in cost function 13 | mpc_state[] stateTrajectory # optimized state trajectory from planner 14 | mpc_input[] inputTrajectory # optimized input trajectory from planner 15 | float64[] timeTrajectory # time trajectory for stateTrajectory and inputTrajectory 16 | uint16[] postEventIndices # array of indices indicating the index of post-event time in the trajectories 17 | mode_schedule modeSchedule # optimal/predefined MPC mode sequence and event times 18 | 19 | controller_data[] data # the actual payload from flatten method: one vector of data per time step 20 | 21 | mpc_performance_indices performanceIndices # solver performance indices 22 | -------------------------------------------------------------------------------- /ocs2_msgs/msg/mpc_input.msg: -------------------------------------------------------------------------------- 1 | # MPC internal model input vector 2 | 3 | float32[] value -------------------------------------------------------------------------------- /ocs2_msgs/msg/mpc_observation.msg: -------------------------------------------------------------------------------- 1 | # MPC observation 2 | float64 time # Current time 3 | mpc_state state # Current state 4 | mpc_input input # Current input 5 | int8 mode # Current mode 6 | -------------------------------------------------------------------------------- /ocs2_msgs/msg/mpc_performance_indices.msg: -------------------------------------------------------------------------------- 1 | # MPC performance indices 2 | float32 initTime 3 | float32 merit 4 | float32 cost 5 | float32 dynamicsViolationSSE 6 | float32 equalityConstraintsSSE 7 | float32 equalityLagrangian 8 | float32 inequalityLagrangian 9 | -------------------------------------------------------------------------------- /ocs2_msgs/msg/mpc_state.msg: -------------------------------------------------------------------------------- 1 | # MPC internal model state vector 2 | float32[] value 3 | -------------------------------------------------------------------------------- /ocs2_msgs/msg/mpc_target_trajectories.msg: -------------------------------------------------------------------------------- 1 | # MPC target trajectories 2 | 3 | float64[] timeTrajectory # MPC target time trajectory 4 | mpc_state[] stateTrajectory # MPC target state trajectory 5 | mpc_input[] inputTrajectory # MPC target input trajectory 6 | 7 | -------------------------------------------------------------------------------- /ocs2_msgs/msg/multiplier.msg: -------------------------------------------------------------------------------- 1 | # MPC multiplier 2 | 3 | float32 time 4 | float32 penalty 5 | float32[] lagrangian -------------------------------------------------------------------------------- /ocs2_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ocs2_msgs 6 | 0.0.0 7 | OCS2 message and service definitions. 8 | 9 | TODO 10 | Farbod Farshidian 11 | Jan Carius 12 | Ruben Grandia 13 | 14 | catkin 15 | 16 | message_generation 17 | 18 | std_msgs 19 | 20 | message_runtime 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_msgs/srv/reset.srv: -------------------------------------------------------------------------------- 1 | # Reset service 2 | bool reset 3 | mpc_target_trajectories targetTrajectories 4 | --- 5 | bool done -------------------------------------------------------------------------------- /ocs2_oc/include/ocs2_oc/rollout/RootFinderType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ocs2 { 4 | 5 | /** 6 | * Enum class for specifying root finding algorithm type. 7 | */ 8 | enum class RootFinderType { ANDERSON_BJORCK, PEGASUS, ILLINOIS, REGULA_FALSI }; 9 | 10 | } // namespace ocs2 11 | -------------------------------------------------------------------------------- /ocs2_oc/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_oc 4 | 0.0.0 5 | The ocs2_oc package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD 12 | 13 | catkin 14 | cmake_modules 15 | cmake_clang_tools 16 | ocs2_core 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocs2_ocs2/src/lintTarget.cpp: -------------------------------------------------------------------------------- 1 | // // sensitivity_equations 2 | // #include 3 | // #include 4 | // #include 5 | // #include 6 | 7 | // // upper_level_op 8 | // #include 9 | // #include 10 | 11 | // // ocs2_ocs2 12 | // // #include 13 | // // #include 14 | // #include 15 | // //#include 16 | // //#include 17 | // // #include 18 | // //#include 19 | 20 | // dummy target for clang toolchain 21 | int main() { 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /ocs2_perceptive/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_perceptive 4 | 0.0.0 5 | The ocs2_perceptive package 6 | 7 | Farbod Farshidian 8 | 9 | BSD 10 | 11 | catkin 12 | cmake_clang_tools 13 | ocs2_core 14 | ocs2_robotic_tools 15 | 16 | 17 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_centroidal_model/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_centroidal_model 4 | 0.0.0 5 | The ocs2_centroidal_model package 6 | 7 | Jean-Pierre Sleiman 8 | Michael Spieler 9 | Farbod Farshidian 10 | 11 | TODO 12 | 13 | catkin 14 | cmake_clang_tools 15 | 16 | ocs2_core 17 | ocs2_robotic_tools 18 | ocs2_robotic_assets 19 | ocs2_pinocchio_interface 20 | pinocchio 21 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_centroidal_model/test/cppad_generated/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_pinocchio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(ocs2_pinocchio) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_pinocchio/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_pinocchio 4 | 1.0.0 5 | Metapackage for OCS2 tools using the pinocchio rigid body dynamics library 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | TODO 11 | 12 | catkin 13 | ocs2_centroidal_model 14 | ocs2_pinocchio_interface 15 | ocs2_self_collision 16 | ocs2_self_collision_visualization 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_pinocchio_interface/cmake/pinocchio_config.cmake: -------------------------------------------------------------------------------- 1 | # Add pinocchio library to the linker's search path 2 | link_directories( 3 | ${pinocchio_LIBRARY_DIRS} 4 | ) 5 | 6 | # Add pinocchio flags 7 | set(OCS2_PINOCCHIO_FLAGS 8 | ${OCS2_CXX_FLAGS} 9 | ${pinocchio_CFLAGS_OTHER} 10 | -Wno-ignored-attributes 11 | -Wno-invalid-partial-specialization # to silence warning with unsupported Eigen Tensor 12 | -DPINOCCHIO_URDFDOM_TYPEDEF_SHARED_PTR 13 | -DPINOCCHIO_URDFDOM_USE_STD_SHARED_PTR 14 | ) -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_pinocchio_interface/include/ocs2_pinocchio_interface/pinocchio_forward_declaration.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /* Forward declaration of main pinocchio types */ 4 | namespace pinocchio { 5 | template 6 | struct JointCollectionDefaultTpl; 7 | template class JointCollectionTpl> 8 | struct ModelTpl; 9 | template class JointCollectionTpl> 10 | struct DataTpl; 11 | template class JointCollectionTpl> 12 | struct JointModelTpl; 13 | } // namespace pinocchio 14 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_pinocchio_interface/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_pinocchio_interface 4 | 0.0.0 5 | The ocs2_pinocchio_interface package 6 | 7 | Michael Spieler 8 | Perry Franklin 9 | 10 | TODO 11 | 12 | catkin 13 | cmake_clang_tools 14 | 15 | ocs2_core 16 | ocs2_robotic_tools 17 | pinocchio 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_pinocchio_interface/test/testPinocchioInterface.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include "CartPoleUrdf.h" 6 | 7 | TEST(testPinocchioInterface, buildFromXml) { 8 | auto pinocchio = ocs2::getPinocchioInterfaceFromUrdfString(cartPoleUrdf); 9 | std::cout << pinocchio; 10 | } 11 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_self_collision/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_self_collision 4 | 0.0.0 5 | The ocs2_self_collision package 6 | 7 | Michael Spieler 8 | Perry Franklin 9 | 10 | TODO 11 | 12 | catkin 13 | cmake_clang_tools 14 | 15 | ocs2_core 16 | ocs2_robotic_tools 17 | ocs2_pinocchio_interface 18 | pinocchio 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_self_collision_visualization/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_self_collision_visualization 4 | 0.0.0 5 | The ocs2_self_collision_visualization package 6 | 7 | Mayank Mittal 8 | 9 | TODO 10 | 11 | catkin 12 | cmake_clang_tools 13 | 14 | roscpp 15 | std_msgs 16 | geometry_msgs 17 | visualization_msgs 18 | ocs2_core 19 | ocs2_robotic_tools 20 | ocs2_pinocchio_interface 21 | ocs2_ros_interfaces 22 | ocs2_self_collision 23 | 24 | -------------------------------------------------------------------------------- /ocs2_pinocchio/ocs2_sphere_approximation/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_sphere_approximation 4 | 0.0.0 5 | The ocs2_sphere_approximation package 6 | 7 | Jia-Ruei Chiu 8 | 9 | TODO 10 | 11 | catkin 12 | cmake_clang_tools 13 | 14 | ocs2_core 15 | ocs2_robotic_tools 16 | ocs2_pinocchio_interface 17 | ocs2_robotic_assets 18 | pinocchio 19 | -------------------------------------------------------------------------------- /ocs2_python_interface/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_python_interface 4 | 0.0.0 5 | The ocs2_python_interface package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | cmake_modules 16 | cmake_clang_tools 17 | 18 | ocs2_mpc 19 | ocs2_ddp 20 | ocs2_robotic_tools 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_python_interface/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | setup_args = generate_distutils_setup( 7 | packages=['ocs2_python_interface'], 8 | package_dir={'': 'src'} 9 | ) 10 | 11 | setup(**setup_args) 12 | -------------------------------------------------------------------------------- /ocs2_raisim/ocs2_legged_robot_raisim/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_legged_robot_raisim 4 | 0.0.1 5 | The ocs2_legged_robot_raisim package 6 | 7 | Alexander Reske 8 | 9 | Farbod Farshidian 10 | Alexander Reske 11 | 12 | BSD-3 13 | 14 | catkin 15 | 16 | cmake_clang_tools 17 | 18 | ocs2_legged_robot 19 | ocs2_legged_robot_ros 20 | ocs2_raisim_core 21 | ocs2_raisim_ros 22 | 23 | 24 | -------------------------------------------------------------------------------- /ocs2_raisim/ocs2_raisim/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(ocs2_raisim) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /ocs2_raisim/ocs2_raisim/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_raisim 4 | 0.0.1 5 | The ocs2_raisim metapackage 6 | 7 | Alexander Reske 8 | 9 | Farbod Farshidian 10 | Alexander Reske 11 | 12 | BSD 13 | 14 | catkin 15 | 16 | ocs2_raisim_core 17 | ocs2_raisim_ros 18 | ocs2_legged_robot_raisim 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ocs2_raisim/ocs2_raisim_core/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_raisim_core 4 | 0.0.1 5 | The ocs2_raisim_core package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD 12 | 13 | Jan Carius 14 | 15 | catkin 16 | cmake_modules 17 | cmake_clang_tools 18 | 19 | ocs2_core 20 | ocs2_oc 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_raisim/ocs2_raisim_ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_raisim_ros 4 | 0.0.1 5 | This package provides ROS functionality to the ocs2_raisim_core package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD 12 | 13 | Jan Carius 14 | 15 | catkin 16 | cmake_modules 17 | cmake_clang_tools 18 | 19 | roscpp 20 | ocs2_raisim_core 21 | grid_map_msgs 22 | 23 | grid_map_rviz_plugin 24 | 25 | 26 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/auto_generated/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | 6 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/include/ocs2_ballbot/generated/declarations.h: -------------------------------------------------------------------------------- 1 | #ifndef IIT_ROBOT_BALLBOT_DECLARATIONS_H_ 2 | #define IIT_ROBOT_BALLBOT_DECLARATIONS_H_ 3 | 4 | #include 5 | 6 | namespace iit { 7 | namespace Ballbot { 8 | 9 | static const int JointSpaceDimension = 5; 10 | static const int jointsCount = 5; 11 | /** The total number of rigid bodies of this robot, including the base */ 12 | static const int linksCount = 6; 13 | 14 | namespace tpl { 15 | template 16 | using Column5d = iit::rbd::PlainMatrix; 17 | 18 | template 19 | using JointState = Column5d; 20 | } 21 | 22 | using Column5d = tpl::Column5d; 23 | typedef Column5d JointState; 24 | 25 | enum JointIdentifiers { 26 | JBALL_X = 0 27 | , JBALL_Y 28 | , JBASE_Z 29 | , JBASE_Y 30 | , JBASE_X 31 | }; 32 | 33 | enum LinkIdentifiers { 34 | WORLD = 0 35 | , DUMMY_BALL1 36 | , BALL 37 | , DUMMY_BASE1 38 | , DUMMY_BASE2 39 | , BASE 40 | }; 41 | 42 | static const JointIdentifiers orderedJointIDs[jointsCount] = 43 | {JBALL_X,JBALL_Y,JBASE_Z,JBASE_Y,JBASE_X}; 44 | 45 | static const LinkIdentifiers orderedLinkIDs[linksCount] = 46 | {WORLD,DUMMY_BALL1,BALL,DUMMY_BASE1,DUMMY_BASE2,BASE}; 47 | 48 | } 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/include/ocs2_ballbot/generated/default_dynparams_getter.h: -------------------------------------------------------------------------------- 1 | #ifndef _BALLBOT_DEFAULT_GETTER_INERTIA_PARAMETERS_ 2 | #define _BALLBOT_DEFAULT_GETTER_INERTIA_PARAMETERS_ 3 | 4 | #include "dynamics_parameters.h" 5 | 6 | namespace iit { 7 | namespace Ballbot { 8 | namespace dyn { 9 | 10 | class DefaultParamsGetter : public RuntimeParamsGetter 11 | { 12 | public: 13 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 14 | DefaultParamsGetter() { 15 | resetDefaults(); 16 | } 17 | ~DefaultParamsGetter() {}; 18 | 19 | public: 20 | void resetDefaults() { 21 | } 22 | 23 | private: 24 | RuntimeInertiaParams values; 25 | }; 26 | 27 | } 28 | } 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/include/ocs2_ballbot/generated/jacobians.h: -------------------------------------------------------------------------------- 1 | #ifndef BALLBOT_JACOBIANS_H_ 2 | #define BALLBOT_JACOBIANS_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include "declarations.h" 8 | #include "kinematics_parameters.h" 9 | 10 | namespace iit { 11 | namespace Ballbot { 12 | 13 | template 14 | class JacobianT : public iit::rbd::JacobianBase, COLS, M> 15 | {}; 16 | 17 | namespace tpl { 18 | 19 | /** 20 | * 21 | */ 22 | template 23 | class Jacobians { 24 | public: 25 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 26 | 27 | typedef typename TRAIT::Scalar Scalar; 28 | typedef iit::rbd::Core CoreS; 29 | 30 | typedef JointState JState; 31 | 32 | public: 33 | Jacobians(); 34 | void updateParameters(); 35 | public: 36 | 37 | protected: 38 | 39 | }; 40 | 41 | } //namespace tpl 42 | 43 | using Jacobians = tpl::Jacobians; 44 | 45 | #include "jacobians.impl.h" 46 | 47 | 48 | } 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/include/ocs2_ballbot/generated/jacobians.impl.h: -------------------------------------------------------------------------------- 1 | 2 | template 3 | iit::Ballbot::tpl::Jacobians::Jacobians 4 | () 5 | { 6 | updateParameters(); 7 | } 8 | 9 | template 10 | void iit::Ballbot::tpl::Jacobians::updateParameters() { 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/include/ocs2_ballbot/generated/kindsl/Ballbot.dtdsl: -------------------------------------------------------------------------------- 1 | /* 2 | * Autogenerated by Urdf2RobCoGen on 2019-09-24 10:25:01 3 | * DO NOT EDIT BY HAND 4 | */ 5 | 6 | Robot Ballbot 7 | Frames { 8 | fr_world 9 | } 10 | Transforms { 11 | } 12 | Jacobians { 13 | } 14 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/include/ocs2_ballbot/generated/kinematics_parameters.h: -------------------------------------------------------------------------------- 1 | #ifndef _BALLBOT_PARAMETERS_GETTERS_ 2 | #define _BALLBOT_PARAMETERS_GETTERS_ 3 | 4 | namespace iit { 5 | namespace Ballbot { 6 | 7 | 8 | 9 | } 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_ballbot 4 | 0.0.0 5 | The ocs2_ballbot package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | cmake_clang_tools 15 | 16 | pybind11_catkin 17 | 18 | ocs2_core 19 | ocs2_mpc 20 | ocs2_ddp 21 | ocs2_slp 22 | ocs2_sqp 23 | ocs2_python_interface 24 | ocs2_robotic_tools 25 | 26 | 27 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | setup_args = generate_distutils_setup( 7 | packages=['ocs2_ballbot'], 8 | package_dir={'': 'src'} 9 | ) 10 | 11 | setup(**setup_args) 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/src/ocs2_ballbot/__init__.py: -------------------------------------------------------------------------------- 1 | from ocs2_ballbot.BallbotPyBindings import mpc_interface 2 | from ocs2_ballbot.BallbotPyBindings import scalar_array, vector_array, matrix_array, TargetTrajectories 3 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot/src/pyBindModule.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | CREATE_ROBOT_PYTHON_BINDINGS(ocs2::ballbot::BallbotPyBindings, BallbotPyBindings) 5 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot_ros/launch/ballbot_ddp.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot_ros/launch/ballbot_mpc_mrt.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot_ros/launch/ballbot_slp.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot_ros/launch/ballbot_sqp.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot_ros/launch/multiplot.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot_ros/launch/visualize.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_ballbot_ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_ballbot_ros 4 | 0.0.0 5 | The ocs2_ballbot_ros package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | cmake_clang_tools 15 | 16 | tf 17 | urdf 18 | kdl_parser 19 | robot_state_publisher 20 | visualization_msgs 21 | 22 | ocs2_core 23 | ocs2_oc 24 | ocs2_ddp 25 | ocs2_mpc 26 | ocs2_sqp 27 | ocs2_slp 28 | ocs2_ros_interfaces 29 | ocs2_ballbot 30 | ocs2_robotic_tools 31 | ocs2_robotic_assets 32 | 33 | 34 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_cartpole/auto_generated/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | 6 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_cartpole/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_cartpole 4 | 0.0.0 5 | The ocs2_cartpole package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | roslib 16 | cmake_clang_tools 17 | 18 | ocs2_core 19 | ocs2_ddp 20 | ocs2_mpc 21 | ocs2_robotic_tools 22 | 23 | 24 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_cartpole_ros/launch/cartpole.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_cartpole_ros/launch/multiplot.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_cartpole_ros/launch/visualize.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_cartpole_ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_cartpole_ros 4 | 0.0.0 5 | The ocs2_cartpole_ros package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | roslib 16 | cmake_clang_tools 17 | 18 | ocs2_core 19 | ocs2_ddp 20 | ocs2_mpc 21 | ocs2_ros_interfaces 22 | ocs2_robotic_tools 23 | ocs2_cartpole 24 | robot_state_publisher 25 | ocs2_robotic_assets 26 | 27 | 28 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator/auto_generated/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | 6 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_double_integrator 4 | 0.0.0 5 | The ocs2_double_integrator package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | cmake_clang_tools 16 | 17 | roslib 18 | pybind11_catkin 19 | 20 | ocs2_core 21 | ocs2_mpc 22 | ocs2_ddp 23 | ocs2_python_interface 24 | ocs2_robotic_tools 25 | 26 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | setup_args = generate_distutils_setup( 7 | packages=['ocs2_double_integrator'], 8 | package_dir={'': 'src'} 9 | ) 10 | 11 | setup(**setup_args) 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator/src/ocs2_double_integrator/__init__.py: -------------------------------------------------------------------------------- 1 | from ocs2_double_integrator.DoubleIntegratorPyBindings import mpc_interface 2 | from ocs2_double_integrator.DoubleIntegratorPyBindings import scalar_array, vector_array, matrix_array, TargetTrajectories 3 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator/src/pyBindModule.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | CREATE_ROBOT_PYTHON_BINDINGS(ocs2::double_integrator::DoubleIntegratorPyBindings, DoubleIntegratorPyBindings) 5 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator_ros/launch/double_integrator.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 20 | 21 | 23 | 24 | 26 | 27 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator_ros/launch/multiplot.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator_ros/launch/visualize.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_double_integrator_ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_double_integrator_ros 4 | 0.0.0 5 | The ocs2_double_integrator_ros package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | cmake_clang_tools 16 | 17 | roslib 18 | pybind11_catkin 19 | 20 | ocs2_core 21 | ocs2_ddp 22 | ocs2_mpc 23 | ocs2_ros_interfaces 24 | ocs2_double_integrator 25 | ocs2_robotic_tools 26 | ocs2_robotic_assets 27 | 28 | 29 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_legged_robot/auto_generated/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | 6 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_legged_robot/config/command/reference.info: -------------------------------------------------------------------------------- 1 | targetDisplacementVelocity 0.5; 2 | targetRotationVelocity 0.3; 3 | 4 | comHeight 0.575 5 | 6 | defaultJointState 7 | { 8 | (0,0) -0.25 ; LF_HAA 9 | (1,0) 0.60 ; LF_HFE 10 | (2,0) -0.85 ; LF_KFE 11 | (3,0) -0.25 ; LH_HAA 12 | (4,0) -0.60 ; LH_HFE 13 | (5,0) 0.85 ; LH_KFE 14 | (6,0) 0.25 ; RF_HAA 15 | (7,0) 0.60 ; RF_HFE 16 | (8,0) -0.85 ; RF_KFE 17 | (9,0) 0.25 ; RH_HAA 18 | (10,0) -0.60 ; RH_HFE 19 | (11,0) 0.85 ; RH_KFE 20 | } 21 | 22 | initialModeSchedule 23 | { 24 | modeSequence 25 | { 26 | [0] STANCE 27 | [1] STANCE 28 | } 29 | eventTimes 30 | { 31 | [0] 0.5 32 | } 33 | } 34 | 35 | defaultModeSequenceTemplate 36 | { 37 | modeSequence 38 | { 39 | [0] STANCE 40 | } 41 | switchingTimes 42 | { 43 | [0] 0.0 44 | [1] 1.0 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_legged_robot/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_legged_robot 4 | 0.0.1 5 | The ocs2_legged_robot package 6 | 7 | Farbod Farshidian 8 | Ruben Grandia 9 | Jean-Pierre Sleiman 10 | 11 | BSD-3 12 | 13 | catkin 14 | 15 | ocs2_core 16 | ocs2_oc 17 | ocs2_ddp 18 | ocs2_mpc 19 | ocs2_sqp 20 | ocs2_ipm 21 | ocs2_robotic_assets 22 | ocs2_robotic_tools 23 | ocs2_pinocchio_interface 24 | ocs2_centroidal_model 25 | pinocchio 26 | 27 | 28 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_legged_robot_ros/launch/multiplot.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_legged_robot_ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_legged_robot_ros 4 | 0.0.1 5 | The ocs2_legged_robot_ros package 6 | 7 | Farbod Farshidian 8 | Ruben Grandia 9 | Jean-Pierre Sleiman 10 | 11 | BSD-3 12 | 13 | catkin 14 | 15 | roslib 16 | tf 17 | urdf 18 | kdl_parser 19 | robot_state_publisher 20 | cmake_modules 21 | 22 | ocs2_core 23 | ocs2_oc 24 | ocs2_ddp 25 | ocs2_mpc 26 | ocs2_sqp 27 | ocs2_ipm 28 | ocs2_robotic_tools 29 | ocs2_pinocchio_interface 30 | ocs2_centroidal_model 31 | ocs2_robotic_assets 32 | ocs2_msgs 33 | ocs2_legged_robot 34 | ocs2_ros_interfaces 35 | 36 | pinocchio 37 | 38 | 39 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator/auto_generated/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_mobile_manipulator 4 | 0.0.0 5 | The ocs2_mobile_manipulator package 6 | 7 | Michael Spieler 8 | Perry Franklin 9 | Mayank Mittal 10 | 11 | TODO 12 | 13 | catkin 14 | cmake_clang_tools 15 | 16 | ocs2_core 17 | ocs2_ddp 18 | ocs2_mpc 19 | ocs2_robotic_tools 20 | ocs2_robotic_assets 21 | ocs2_pinocchio_interface 22 | ocs2_self_collision 23 | pinocchio 24 | 25 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/include/mobile_manipulator_distance.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/include/visualize.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/manipulator_franka.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/manipulator_kinova_j2n6.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/manipulator_kinova_j2n7.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/manipulator_mabi_mobile.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/manipulator_pr2.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/launch/manipulator_ridgeback_ur5.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_mobile_manipulator_ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_mobile_manipulator_ros 4 | 0.0.0 5 | The ocs2_mobile_manipulator_ros package 6 | 7 | Farbod Farshidian 8 | Michael Spieler 9 | Perry Franklin 10 | Mayank Mittal 11 | 12 | BSD3 13 | 14 | catkin 15 | cmake_clang_tools 16 | 17 | roslib 18 | tf 19 | urdf 20 | kdl_parser 21 | robot_state_publisher 22 | visualization_msgs 23 | geometry_msgs 24 | ocs2_core 25 | ocs2_ddp 26 | ocs2_mpc 27 | ocs2_robotic_tools 28 | ocs2_robotic_assets 29 | ocs2_ros_interfaces 30 | ocs2_pinocchio_interface 31 | ocs2_self_collision 32 | ocs2_self_collision_visualization 33 | ocs2_mobile_manipulator 34 | pinocchio 35 | 36 | 37 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(ocs2_anymal) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_anymal 4 | 0.0.0 5 | The ocs2_anymal metapackage 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | ocs2_anymal_mpc 16 | ocs2_anymal_loopshaping_mpc 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/config/motions.info: -------------------------------------------------------------------------------- 1 | dt 0.05; 2 | 3 | motionList 4 | { 5 | [0] walking 6 | [1] demo_motion 7 | } 8 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/include/ocs2_anymal_commands/ModeSequenceKeyboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModeSequence_Keyboard_Quadruped.h 3 | * 4 | * Created on: Oct 11, 2018 5 | * Author: farbod 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | namespace switched_model { 19 | 20 | /** This class implements ModeSequence communication using ROS. */ 21 | class ModeSequenceKeyboard { 22 | public: 23 | ModeSequenceKeyboard(ros::NodeHandle nodeHandle, const std::string& gaitFile, const std::string& robotName, bool verbose = false); 24 | 25 | /** Prints the command line interface and responds to user input. Function returns after one user input. */ 26 | void getKeyboardCommand(); 27 | 28 | private: 29 | /** Prints the list of available gaits. */ 30 | void printGaitList(const std::vector& gaitList) const; 31 | 32 | /** Publishes the mode sequence template. */ 33 | void publishModeSequenceTemplate(const ModeSequenceTemplate& modeSchedule); 34 | 35 | std::vector gaitList_; 36 | std::map gaitMap_; 37 | 38 | ros::Publisher modeSequenceTemplatePublisher_; 39 | }; 40 | 41 | } // end of namespace switched_model 42 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/include/ocs2_anymal_commands/MotionCommandController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 14.10.21. 3 | // 4 | 5 | #pragma once 6 | 7 | #include "ocs2_anymal_commands/MotionCommandInterface.h" 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace switched_model { 16 | 17 | class MotionCommandController : public MotionCommandInterface { 18 | public: 19 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 20 | MotionCommandController(ros::NodeHandle& nodeHandle, const std::string& configFile, const std::string& controllerName); 21 | ~MotionCommandController() override = default; 22 | 23 | void publishMotion(const std::pair& motion) override; 24 | 25 | private: 26 | ros::ServiceClient client; 27 | }; 28 | 29 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/include/ocs2_anymal_commands/MotionCommandDummy.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 14.10.21. 3 | // 4 | 5 | #pragma once 6 | 7 | #include "ocs2_anymal_commands/MotionCommandInterface.h" 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace switched_model { 16 | 17 | class MotionCommandDummy : public MotionCommandInterface { 18 | public: 19 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 20 | MotionCommandDummy(ros::NodeHandle& nodeHandle, const std::string& configFile, const std::string& robotName); 21 | ~MotionCommandDummy() override = default; 22 | 23 | void publishMotion(const std::pair& motion) override; 24 | 25 | private: 26 | void observationCallback(const ocs2_msgs::mpc_observation::ConstPtr& msg); 27 | 28 | void terrainCallback(const visualization_msgs::Marker::ConstPtr& msg); 29 | 30 | ros::Publisher targetTrajectoryPublisher_; 31 | ros::Publisher gaitSequencePublisher_; 32 | 33 | ros::Subscriber observationSubscriber_; 34 | std::mutex observationMutex_; 35 | std::unique_ptr observationPtr_; 36 | 37 | ros::Subscriber terrainSubscriber_; 38 | std::mutex terrainMutex_; 39 | TerrainPlane localTerrain_; 40 | }; 41 | 42 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/include/ocs2_anymal_commands/MotionCommandInterface.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Timon Kaufmann in June 2021 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | namespace switched_model { 16 | 17 | class MotionCommandInterface { 18 | public: 19 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 20 | explicit MotionCommandInterface(const std::string& configFile); 21 | virtual ~MotionCommandInterface() = default; 22 | 23 | virtual void publishMotion(const std::pair& motion) = 0; 24 | 25 | void getKeyboardCommand(); 26 | 27 | private: 28 | void printAnimationList() const; 29 | 30 | std::unordered_map> motionData_; 31 | }; 32 | 33 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/include/ocs2_anymal_commands/PoseCommandToCostDesiredRos.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 04.05.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | namespace switched_model { 19 | 20 | class PoseCommandToCostDesiredRos { 21 | public: 22 | scalar_t targetDisplacementVelocity; 23 | scalar_t targetRotationVelocity; 24 | scalar_t comHeight; 25 | joint_coordinate_t defaultJointState; 26 | 27 | PoseCommandToCostDesiredRos(::ros::NodeHandle& nodeHandle, const std::string& configFile); 28 | 29 | ocs2::TargetTrajectories commandLineToTargetTrajectories(const vector_t& commadLineTarget, const ocs2::SystemObservation& observation) const; 30 | 31 | private: 32 | scalar_t desiredTimeToTarget(scalar_t dyaw, scalar_t dx, scalar_t dy) const; 33 | 34 | void terrainCallback(const visualization_msgs::Marker::ConstPtr& msg); 35 | 36 | TerrainPlane localTerrain_; 37 | mutable std::mutex terrainMutex_; 38 | ros::Subscriber terrainSubscriber_; 39 | }; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_anymal_commands 4 | 0.0.0 5 | The ocs2_anymal_commands package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | roslib 16 | ocs2_ros_interfaces 17 | ocs2_robotic_tools 18 | ocs2_switched_model_interface 19 | grid_map_filters_rsl 20 | 21 | 22 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/src/AnymalGaitNode.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * AnymalModeSequenceCommand.cpp 3 | * 4 | * Created on: Oct 11, 2018 5 | * Author: farbod 6 | */ 7 | 8 | #include 9 | 10 | #include "ocs2_anymal_commands/ModeSequenceKeyboard.h" 11 | 12 | int main(int argc, char* argv[]) { 13 | const std::string robotName = "anymal"; 14 | std::string gaitFile = ros::package::getPath("ocs2_anymal_commands") + "/config/gait.info"; 15 | std::cerr << "Loading gait file: " << gaitFile << std::endl; 16 | 17 | ros::init(argc, argv, robotName + "_mpc_mode_sequence"); 18 | ros::NodeHandle nodeHandle; 19 | 20 | switched_model::ModeSequenceKeyboard modeSequenceCommand(nodeHandle, gaitFile, robotName, true); 21 | 22 | while (ros::ok() && ros::master::check()) { 23 | modeSequenceCommand.getKeyboardCommand(); 24 | } 25 | 26 | // Successful exit 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/src/MotionCommandController.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Timon Kaufmann in June 2021 3 | // 4 | 5 | #include "ocs2_anymal_commands/MotionCommandController.h" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace switched_model { 13 | 14 | MotionCommandController::MotionCommandController(ros::NodeHandle& nodeHandle, const std::string& configFile, 15 | const std::string& controllerName) 16 | : MotionCommandInterface(configFile), 17 | client(nodeHandle.serviceClient(controllerName + "/trajectory_request")) {} 18 | 19 | void MotionCommandController::publishMotion(const std::pair& motion) { 20 | Gait stance; 21 | stance.duration = 1.0; 22 | stance.modeSequence = {15}; 23 | 24 | ocs2_switched_model_msgs::trajectory_request srv; 25 | srv.request.trajectory = ocs2::ros_msg_conversions::createTargetTrajectoriesMsg(motion.first); 26 | srv.request.gaitSequence = switched_model::ros_msg_conversions::toMessage({motion.second, stance}); 27 | 28 | client.call(srv); 29 | } 30 | 31 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_commands/test/data/testCsv.txt: -------------------------------------------------------------------------------- 1 | t, x0,x1 2 | 0.0, 1, 2.0 3 | 1.0, 2.0,3.0 -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/config/c_series/frame_declaration.info: -------------------------------------------------------------------------------- 1 | root base 2 | 3 | left_front { 4 | root LF_HAA 5 | tip LF_FOOT 6 | joints { 7 | [0] LF_HAA 8 | [1] LF_HFE 9 | [2] LF_KFE 10 | } 11 | } 12 | 13 | right_front { 14 | root RF_HAA 15 | tip RF_FOOT 16 | joints { 17 | [0] RF_HAA 18 | [1] RF_HFE 19 | [2] RF_KFE 20 | } 21 | } 22 | 23 | left_hind { 24 | root LH_HAA 25 | tip LH_FOOT 26 | joints { 27 | [0] LH_HAA 28 | [1] LH_HFE 29 | [2] LH_KFE 30 | } 31 | } 32 | 33 | right_hind { 34 | root RH_HAA 35 | tip RH_FOOT 36 | joints { 37 | [0] RH_HAA 38 | [1] RH_HFE 39 | [2] RH_KFE 40 | } 41 | } 42 | 43 | collisions { 44 | collisionSpheres { 45 | [0] "LF_KFE, 0.08" 46 | [1] "RF_KFE, 0.08" 47 | [2] "LH_KFE, 0.08" 48 | [3] "RH_KFE, 0.08" 49 | } 50 | collisionOffsets { 51 | (0,0) -0.055 52 | (0,1) 0.0 53 | (0,2) 0.0 54 | (1,0) -0.055 55 | (1,1) 0.0 56 | (1,2) 0.0 57 | (2,0) -0.055 58 | (2,1) 0.0 59 | (2,2) 0.0 60 | (3,0) -0.055 61 | (3,1) 0.0 62 | (3,2) 0.0 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/config/c_series/loopshaping.info: -------------------------------------------------------------------------------- 1 | s_inv_filter 2 | { 3 | numFilters 2; 4 | 5 | Filter0; Filter for forces 6 | { 7 | numRepeats 12; 8 | numPoles 1; 9 | numZeros 1; 10 | scaling 4; 11 | zeros 12 | { 13 | (0) 0.0; 14 | } 15 | poles 16 | { 17 | (0) -100.0; 18 | } 19 | } 20 | 21 | Filter1; Filter for joint velocities 22 | { 23 | numRepeats 12; 24 | numPoles 1; 25 | numZeros 1; 26 | scaling 3; 27 | zeros 28 | { 29 | (0) 0.0; 30 | } 31 | poles 32 | { 33 | (0) -50.0; 34 | } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/config/c_series/multiple_shooting.info: -------------------------------------------------------------------------------- 1 | multiple_shooting 2 | { 3 | dt 0.015 4 | alpha_min 1e-2 ; = 7 tries before terminating 5 | sqpIteration 1 6 | deltaTol 1e-4 7 | g_max 1e-2 8 | g_min 1e-5 9 | inequalityConstraintMu 0.1 10 | inequalityConstraintDelta 5.0 11 | projectStateInputEqualityConstraints true 12 | printSolverStatistics true 13 | printSolverStatus false 14 | printLinesearch false 15 | enableLogging true 16 | logSize 50000 17 | useFeedbackPolicy true 18 | integratorType RK2 19 | nThreads 4 20 | threadPriority 50 21 | } -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/demo_terrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/demo_terrain.png -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/gaps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/gaps.png -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/hurdles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/hurdles.png -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/side_gap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/side_gap.png -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/step.png -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/stepping_stones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/data/stepping_stones.png -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/include/ocs2_anymal_loopshaping_mpc/AnymalLoopshapingInterface.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 13.02.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace anymal { 11 | 12 | std::unique_ptr getAnymalLoopshapingInterface(const std::string& urdf, 13 | const std::string& configFolder); 14 | 15 | std::unique_ptr getAnymalLoopshapingInterface( 16 | const std::string& urdf, switched_model::QuadrupedInterface::Settings settings, const FrameDeclaration& frameDeclaration, 17 | std::shared_ptr loopshapingDefinition); 18 | 19 | std::string getConfigFolderLoopshaping(const std::string& configName); 20 | 21 | std::string getTaskFilePathLoopshaping(const std::string& configName); 22 | 23 | } // end of namespace anymal 24 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/launch/anymal_c.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/launch/camel.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_anymal_loopshaping_mpc 4 | 0.0.0 5 | ocs2_anymal_loopshaping_mpc 6 | 7 | ruben 8 | TODO 9 | 10 | catkin 11 | 12 | roslib 13 | ocs2_anymal_mpc 14 | ocs2_quadruped_loopshaping_interface 15 | 16 | 17 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_loopshaping_mpc/src/AnymalLoopshapingDummyMrt.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 13.02.20. 3 | // 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include "ocs2_anymal_loopshaping_mpc/AnymalLoopshapingInterface.h" 10 | 11 | int main(int argc, char* argv[]) { 12 | std::vector programArgs{}; 13 | ::ros::removeROSArgs(argc, argv, programArgs); 14 | if (programArgs.size() < 3) { 15 | throw std::runtime_error("No robot name and config folder specified. Aborting."); 16 | } 17 | const std::string descriptionName(programArgs[1]); 18 | const std::string configName(programArgs[2]); 19 | 20 | // Initialize ros node 21 | ros::init(argc, argv, "anymal_loopshaping_mrt"); 22 | ros::NodeHandle nodeHandle; 23 | 24 | std::string urdfString; 25 | nodeHandle.getParam(descriptionName, urdfString); 26 | 27 | auto anymalInterface = anymal::getAnymalLoopshapingInterface(urdfString, anymal::getConfigFolderLoopshaping(configName)); 28 | const auto mpcSettings = ocs2::mpc::loadSettings(anymal::getTaskFilePathLoopshaping(configName)); 29 | quadrupedLoopshapingDummyNode(nodeHandle, *anymalInterface, mpcSettings.mrtDesiredFrequency_, mpcSettings.mpcDesiredFrequency_); 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/include/ocs2_anymal_models/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated file 2 | package_path.h 3 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/include/ocs2_anymal_models/FrameDeclaration.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 27.04.22. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace anymal { 10 | 11 | struct CollisionDeclaration { 12 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 13 | std::string link; 14 | switched_model::scalar_t radius; 15 | switched_model::vector3_t offset; 16 | }; 17 | 18 | struct LimbFrames { 19 | std::string root; 20 | std::string tip; 21 | std::vector joints; 22 | }; 23 | 24 | struct FrameDeclaration { 25 | std::string root; 26 | switched_model::feet_array_t legs; 27 | std::vector collisions; 28 | }; 29 | 30 | std::vector getJointNames(const FrameDeclaration& frameDeclaration); 31 | 32 | LimbFrames limbFramesFromFile(const std::string& file, const std::string& field); 33 | 34 | FrameDeclaration frameDeclarationFromFile(const std::string& file); 35 | 36 | } // namespace anymal -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/launch/load_urdf.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/launch/vizualize_urdf.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_anymal_models 4 | 0.0.1 5 | The ocs2_anymal_models package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | ocs2_switched_model_interface 16 | ocs2_pinocchio_interface 17 | ocs2_robotic_assets 18 | ocs2_robotic_tools 19 | roslib 20 | 21 | 22 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/test/camel/generated/default_dynparams_getter.h: -------------------------------------------------------------------------------- 1 | #ifndef _CAMEL_DEFAULT_GETTER_INERTIA_PARAMETERS_ 2 | #define _CAMEL_DEFAULT_GETTER_INERTIA_PARAMETERS_ 3 | 4 | #include "dynamics_parameters.h" 5 | 6 | namespace iit { 7 | namespace camel { 8 | namespace dyn { 9 | 10 | class DefaultParamsGetter : public RuntimeParamsGetter 11 | { 12 | public: 13 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 14 | DefaultParamsGetter() { 15 | resetDefaults(); 16 | } 17 | ~DefaultParamsGetter() {}; 18 | 19 | public: 20 | void resetDefaults() { 21 | } 22 | 23 | private: 24 | RuntimeInertiaParams values; 25 | }; 26 | 27 | } 28 | } 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/test/camel/generated/kinematics_parameters.h: -------------------------------------------------------------------------------- 1 | #ifndef _CAMEL_PARAMETERS_GETTERS_ 2 | #define _CAMEL_PARAMETERS_GETTERS_ 3 | 4 | namespace iit { 5 | namespace camel { 6 | 7 | 8 | 9 | } 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_models/urdf/frame_declaration_anymal_c.info: -------------------------------------------------------------------------------- 1 | root base 2 | 3 | left_front { 4 | root LF_HAA 5 | tip LF_FOOT 6 | joints { 7 | [0] LF_HAA 8 | [1] LF_HFE 9 | [2] LF_KFE 10 | } 11 | } 12 | 13 | right_front { 14 | root RF_HAA 15 | tip RF_FOOT 16 | joints { 17 | [0] RF_HAA 18 | [1] RF_HFE 19 | [2] RF_KFE 20 | } 21 | } 22 | 23 | left_hind { 24 | root LH_HAA 25 | tip LH_FOOT 26 | joints { 27 | [0] LH_HAA 28 | [1] LH_HFE 29 | [2] LH_KFE 30 | } 31 | } 32 | 33 | right_hind { 34 | root RH_HAA 35 | tip RH_FOOT 36 | joints { 37 | [0] RH_HAA 38 | [1] RH_HFE 39 | [2] RH_KFE 40 | } 41 | } 42 | 43 | collisions { 44 | collisionSpheres { 45 | [0] "LF_KFE, 0.08" 46 | [1] "RF_KFE, 0.08" 47 | [2] "LH_KFE, 0.08" 48 | [3] "RH_KFE, 0.08" 49 | } 50 | collisionOffsets { 51 | (0,0) -0.055 52 | (0,1) 0.0 53 | (0,2) 0.0 54 | (1,0) -0.055 55 | (1,1) 0.0 56 | (1,2) 0.0 57 | (2,0) -0.055 58 | (2,1) 0.0 59 | (2,2) 0.0 60 | (3,0) -0.055 61 | (3,1) 0.0 62 | (3,2) 0.0 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_mpc/config/c_series/frame_declaration.info: -------------------------------------------------------------------------------- 1 | root base 2 | 3 | left_front { 4 | root LF_HAA 5 | tip LF_FOOT 6 | joints { 7 | [0] LF_HAA 8 | [1] LF_HFE 9 | [2] LF_KFE 10 | } 11 | } 12 | 13 | right_front { 14 | root RF_HAA 15 | tip RF_FOOT 16 | joints { 17 | [0] RF_HAA 18 | [1] RF_HFE 19 | [2] RF_KFE 20 | } 21 | } 22 | 23 | left_hind { 24 | root LH_HAA 25 | tip LH_FOOT 26 | joints { 27 | [0] LH_HAA 28 | [1] LH_HFE 29 | [2] LH_KFE 30 | } 31 | } 32 | 33 | right_hind { 34 | root RH_HAA 35 | tip RH_FOOT 36 | joints { 37 | [0] RH_HAA 38 | [1] RH_HFE 39 | [2] RH_KFE 40 | } 41 | } 42 | 43 | collisions { 44 | collisionSpheres { 45 | [0] "LF_KFE, 0.08" 46 | [1] "RF_KFE, 0.08" 47 | [2] "LH_KFE, 0.08" 48 | [3] "RH_KFE, 0.08" 49 | } 50 | collisionOffsets { 51 | (0,0) -0.055 52 | (0,1) 0.0 53 | (0,2) 0.0 54 | (1,0) -0.055 55 | (1,1) 0.0 56 | (1,2) 0.0 57 | (2,0) -0.055 58 | (2,1) 0.0 59 | (2,2) 0.0 60 | (3,0) -0.055 61 | (3,1) 0.0 62 | (3,2) 0.0 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_mpc/config/c_series/multiple_shooting.info: -------------------------------------------------------------------------------- 1 | multiple_shooting 2 | { 3 | dt 0.015 4 | sqpIteration 1 5 | deltaTol 1e-4 6 | g_max 1e-2 7 | g_min 1e-6 8 | inequalityConstraintMu 0.1 9 | inequalityConstraintDelta 5.0 10 | projectStateInputEqualityConstraints true 11 | printSolverStatistics true 12 | printSolverStatus false 13 | printLinesearch false 14 | useFeedbackPolicy true 15 | integratorType RK2 16 | nThreads 4 17 | threadPriority 50 18 | } -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_mpc/config/c_series/targetCommand.info: -------------------------------------------------------------------------------- 1 | targetDisplacementVelocity 0.5; 2 | targetRotationVelocity 0.3; 3 | 4 | comHeight 0.57; 5 | 6 | defaultJointState 7 | { 8 | (0,0) -0.25; LF_HAA 9 | (1,0) 0.60; LF_HFE 10 | (2,0) -0.85; LF_KFE 11 | (3,0) 0.25; RF_HAA 12 | (4,0) 0.60; RF_HFE 13 | (5,0) -0.85; RF_KFE 14 | (6,0) -0.25; LH_HAA 15 | (7,0) -0.60; LH_HFE 16 | (8,0) 0.85; LH_KFE 17 | (9,0) 0.25; RH_HAA 18 | (10,0) -0.60; RH_HFE 19 | (11,0) 0.85; RH_KFE 20 | } -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_mpc/include/ocs2_anymal_mpc/AnymalInterface.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 17.02.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace anymal { 13 | 14 | std::unique_ptr getAnymalInterface(const std::string& urdf, const std::string& taskFolder); 15 | 16 | std::unique_ptr getAnymalInterface(const std::string& urdf, 17 | switched_model::QuadrupedInterface::Settings settings, 18 | const FrameDeclaration& frameDeclaration); 19 | 20 | std::string getConfigFolder(const std::string& configName); 21 | 22 | std::string getTaskFilePath(const std::string& configName); 23 | 24 | } // end of namespace anymal 25 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_mpc/launch/camel.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_mpc/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_anymal_mpc 4 | 0.0.0 5 | The ocs2_anymal_mpc package 6 | 7 | farbod 8 | 9 | TODO 10 | 11 | catkin 12 | 13 | roslib 14 | ocs2_anymal_models 15 | ocs2_quadruped_interface 16 | 17 | ocs2_anymal_commands 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_anymal_mpc/src/AnymalDummyMRT.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * DummyMRT.cpp 3 | * 4 | * Created on: Apr 10, 2018 5 | * Author: farbod 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | #include "ocs2_anymal_mpc/AnymalInterface.h" 13 | 14 | int main(int argc, char* argv[]) { 15 | std::vector programArgs{}; 16 | ros::removeROSArgs(argc, argv, programArgs); 17 | if (programArgs.size() < 3) { 18 | throw std::runtime_error("No robot name and config folder specified. Aborting."); 19 | } 20 | const std::string descriptionName(programArgs[1]); 21 | const std::string configName(programArgs[2]); 22 | 23 | // Initialize ros node 24 | ros::init(argc, argv, "anymal_mrt"); 25 | ros::NodeHandle nodeHandle; 26 | 27 | std::string urdfString; 28 | nodeHandle.getParam(descriptionName, urdfString); 29 | 30 | auto anymalInterface = anymal::getAnymalInterface(urdfString, anymal::getConfigFolder(configName)); 31 | const auto mpcSettings = ocs2::mpc::loadSettings(anymal::getTaskFilePath(configName)); 32 | quadrupedDummyNode(nodeHandle, *anymalInterface, &anymalInterface->getRollout(), mpcSettings.mrtDesiredFrequency_, 33 | mpcSettings.mpcDesiredFrequency_); 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/include/ocs2_quadruped_interface/QuadrupedDummyNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 17.02.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include "QuadrupedInterface.h" 10 | 11 | namespace switched_model { 12 | 13 | void quadrupedDummyNode(ros::NodeHandle& nodeHandle, const QuadrupedInterface& quadrupedInterface, const ocs2::RolloutBase* rolloutPtr, 14 | double mrtDesiredFrequency, double mpcDesiredFrequency); 15 | } 16 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/include/ocs2_quadruped_interface/QuadrupedMpc.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 06.07.21. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "ocs2_quadruped_interface/QuadrupedInterface.h" 13 | 14 | namespace switched_model { 15 | 16 | /** Constructs an DDP MPC object */ 17 | std::unique_ptr getDdpMpc(const QuadrupedInterface& quadrupedInterface, const ocs2::mpc::Settings& mpcSettings, 18 | const ocs2::ddp::Settings& ddpSettings); 19 | 20 | /** Constructs an SQP MPC object */ 21 | std::unique_ptr getSqpMpc(const QuadrupedInterface& quadrupedInterface, const ocs2::mpc::Settings& mpcSettings, 22 | const ocs2::sqp::Settings& sqpSettings); 23 | 24 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/include/ocs2_quadruped_interface/QuadrupedMpcNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 17.02.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include 10 | 11 | #include "QuadrupedInterface.h" 12 | 13 | namespace switched_model { 14 | 15 | void quadrupedMpcNode(ros::NodeHandle& nodeHandle, const QuadrupedInterface& quadrupedInterface, std::unique_ptr mpcPtr); 16 | } 17 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/include/ocs2_quadruped_interface/TerrainReceiver.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 28.09.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | #include 16 | 17 | namespace switched_model { 18 | 19 | class TerrainReceiverSynchronizedModule : public ocs2::SolverSynchronizedModule { 20 | public: 21 | TerrainReceiverSynchronizedModule(ocs2::Synchronized& terrainModel, ros::NodeHandle& nodeHandle); 22 | ~TerrainReceiverSynchronizedModule() override = default; 23 | 24 | void preSolverRun(scalar_t initTime, scalar_t finalTime, const vector_t& currentState, 25 | const ocs2::ReferenceManagerInterface& referenceManager) override; 26 | 27 | void postSolverRun(const ocs2::PrimalSolution& primalSolution) override{}; 28 | 29 | private: 30 | ocs2::Synchronized* terrainModelPtr_; 31 | std::unique_ptr segmentedPlanesRos_; 32 | }; 33 | 34 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/launch/visualization.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_quadruped_interface 4 | 0.0.0 5 | The ocs2_quadruped_interface package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | ocs2_core 16 | ocs2_ddp 17 | ocs2_ocs2 18 | ocs2_mpc 19 | ocs2_sqp 20 | ocs2_ros_interfaces 21 | ocs2_robotic_tools 22 | ocs2_switched_model_interface 23 | ocs2_anymal_commands 24 | roscpp 25 | tf 26 | kdl_parser 27 | robot_state_publisher 28 | segmented_planes_terrain_model 29 | 30 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_interface/src/TerrainReceiver.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 28.09.20. 3 | // 4 | 5 | #include "ocs2_quadruped_interface/TerrainReceiver.h" 6 | 7 | namespace switched_model { 8 | 9 | TerrainReceiverSynchronizedModule::TerrainReceiverSynchronizedModule(ocs2::Synchronized& terrainModel, 10 | ros::NodeHandle& nodeHandle) 11 | : terrainModelPtr_(&terrainModel), segmentedPlanesRos_(new switched_model::SegmentedPlanesTerrainModelRos(nodeHandle)) {} 12 | 13 | void TerrainReceiverSynchronizedModule::preSolverRun(scalar_t initTime, scalar_t finalTime, const vector_t& currentState, 14 | const ocs2::ReferenceManagerInterface& referenceManager) { 15 | if (auto newTerrain = segmentedPlanesRos_->getTerrainModel()) { 16 | terrainModelPtr_->reset(std::move(newTerrain)); 17 | segmentedPlanesRos_->publish(); 18 | } 19 | } 20 | 21 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_loopshaping_interface/include/ocs2_quadruped_loopshaping_interface/LoopshapingDimensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 18.02.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include 10 | 11 | namespace switched_model_loopshaping { 12 | 13 | static constexpr size_t STATE_DIM = 48; 14 | static constexpr size_t INPUT_DIM = 24; 15 | static constexpr size_t SYSTEM_STATE_DIM = 24; 16 | static constexpr size_t SYSTEM_INPUT_DIM = 24; 17 | static constexpr size_t FILTER_STATE_DIM = 24; 18 | static constexpr size_t FILTER_INPUT_DIM = 24; 19 | 20 | using scalar_t = ocs2::scalar_t; 21 | using ad_scalar_t = ocs2::ad_scalar_t; 22 | using scalar_array_t = ocs2::scalar_array_t; 23 | using vector_t = ocs2::vector_t; 24 | using vector_array_t = ocs2::vector_array_t; 25 | 26 | template 27 | using filter_state_s_t = Eigen::Matrix; 28 | using filter_state_t = filter_state_s_t; 29 | using filter_state_ad_t = filter_state_s_t; 30 | 31 | template 32 | using filter_input_s_t = Eigen::Matrix; 33 | using filter_input_t = filter_input_s_t; 34 | using filter_input_ad_t = filter_input_s_t; 35 | 36 | } // namespace switched_model_loopshaping 37 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_loopshaping_interface/include/ocs2_quadruped_loopshaping_interface/QuadrupedLoopshapingDummyNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 17.02.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include "QuadrupedLoopshapingInterface.h" 10 | 11 | namespace switched_model_loopshaping { 12 | 13 | void quadrupedLoopshapingDummyNode(ros::NodeHandle& nodeHandle, const QuadrupedLoopshapingInterface& quadrupedInterface, 14 | double mrtDesiredFrequency, double mpcDesiredFrequency); 15 | 16 | } // namespace switched_model_loopshaping 17 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_loopshaping_interface/include/ocs2_quadruped_loopshaping_interface/QuadrupedLoopshapingMpc.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 06.07.21. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "ocs2_quadruped_loopshaping_interface/QuadrupedLoopshapingInterface.h" 13 | 14 | namespace switched_model_loopshaping { 15 | 16 | /** Constructs an DDP MPC object */ 17 | std::unique_ptr getDdpMpc(const QuadrupedLoopshapingInterface& quadrupedInterface, const ocs2::mpc::Settings& mpcSettings, 18 | const ocs2::ddp::Settings& ddpSettings); 19 | 20 | /** Constructs an SQP MPC object */ 21 | std::unique_ptr getSqpMpc(const QuadrupedLoopshapingInterface& quadrupedInterface, const ocs2::mpc::Settings& mpcSettings, 22 | const ocs2::sqp::Settings& sqpSettings); 23 | 24 | } // namespace switched_model_loopshaping -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_loopshaping_interface/include/ocs2_quadruped_loopshaping_interface/QuadrupedLoopshapingMpcNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 17.02.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include 10 | 11 | #include "QuadrupedLoopshapingInterface.h" 12 | 13 | namespace switched_model_loopshaping { 14 | 15 | void quadrupedLoopshapingMpcNode(ros::NodeHandle& nodeHandle, const QuadrupedLoopshapingInterface& quadrupedInterface, 16 | std::unique_ptr mpcPtr); 17 | 18 | } // namespace switched_model_loopshaping -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_quadruped_loopshaping_interface/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_quadruped_loopshaping_interface 4 | 0.0.0 5 | The ocs2_quadruped_loopshaping_interface package 6 | 7 | 8 | 9 | 10 | farbod 11 | 12 | 13 | TODO 14 | 15 | catkin 16 | 17 | ocs2_quadruped_interface 18 | 19 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/analytical_inverse_kinematics/AnalyticalInverseKinematics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ocs2_switched_model_interface/analytical_inverse_kinematics/LegInverseKinematicParameters.h" 4 | 5 | namespace switched_model { 6 | namespace analytical_inverse_kinematics { 7 | 8 | /** 9 | * Computes the inverse kinematics for a single leg given the position in base frame 10 | * @param legJoints : will be filled with the resulting [HAA, HFE, KFE] joint angles 11 | * @param positionBaseToFootInBaseFrame : position of the foot in base frame to compute the IK for. 12 | * @param parameters : precomputed inverse kinematics parameters 13 | * @param limb : limb number in {LF = 0, RF, LH, RH} 14 | */ 15 | void getLimbJointPositionsFromPositionBaseToFootInBaseFrame(Eigen::Vector3d& legJoints, 16 | const Eigen::Vector3d& positionBaseToFootInBaseFrame, 17 | const LegInverseKinematicParameters& parameters, size_t limb); 18 | 19 | } // namespace analytical_inverse_kinematics 20 | } // namespace switched_model 21 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/core/InverseKinematicsModelBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 02.08.22. 3 | // 4 | 5 | #pragma once 6 | 7 | #include "ocs2_switched_model_interface/core/SwitchedModel.h" 8 | 9 | namespace switched_model { 10 | 11 | class InverseKinematicsModelBase { 12 | public: 13 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 14 | 15 | using joint_jacobian_block_t = Eigen::Matrix; 16 | 17 | virtual ~InverseKinematicsModelBase() = default; 18 | 19 | virtual vector3_t getLimbJointPositionsFromPositionBaseToFootInBaseFrame(size_t footIndex, 20 | const vector3_t& positionBaseToFootInBaseFrame) const = 0; 21 | 22 | virtual vector3_t getLimbVelocitiesFromFootVelocityRelativeToBaseInBaseFrame(size_t footIndex, 23 | const vector3_t& footVelocityRelativeToBaseInBaseFrame, 24 | const joint_jacobian_block_t& jointJacobian, 25 | scalar_t damping) const = 0; 26 | 27 | virtual InverseKinematicsModelBase* clone() const = 0; 28 | }; 29 | 30 | }; // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/foot_planner/CubicSpline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CubicSpline.h 3 | * 4 | * Created on: Apr 30, 2017 5 | * Author: farbod 6 | */ 7 | 8 | #pragma once 9 | 10 | #include "ocs2_switched_model_interface/core/SwitchedModel.h" 11 | 12 | namespace switched_model { 13 | 14 | class CubicSpline { 15 | public: 16 | struct Node { 17 | scalar_t time; 18 | scalar_t position; 19 | scalar_t velocity; 20 | }; 21 | 22 | CubicSpline(Node start, Node end); 23 | 24 | scalar_t position(scalar_t time) const; 25 | 26 | scalar_t velocity(scalar_t time) const; 27 | 28 | scalar_t acceleration(scalar_t time) const; 29 | 30 | scalar_t startTimeDerivative(scalar_t t) const; 31 | 32 | scalar_t finalTimeDerivative(scalar_t t) const; 33 | 34 | private: 35 | scalar_t normalizedTime(scalar_t t) const; 36 | 37 | scalar_t t0_; 38 | scalar_t t1_; 39 | scalar_t dt_; 40 | 41 | scalar_t c0_; 42 | scalar_t c1_; 43 | scalar_t c2_; 44 | scalar_t c3_; 45 | 46 | scalar_t dc0_; // derivative w.r.t. dt_ 47 | scalar_t dc1_; // derivative w.r.t. dt_ 48 | scalar_t dc2_; // derivative w.r.t. dt_ 49 | scalar_t dc3_; // derivative w.r.t. dt_ 50 | }; 51 | 52 | } // namespace switched_model 53 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/foot_planner/SplineCpg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SplineCPG.h 3 | * 4 | * Created on: Apr 30, 2017 5 | * Author: farbod 6 | */ 7 | 8 | #pragma once 9 | 10 | #include "ocs2_switched_model_interface/foot_planner/CubicSpline.h" 11 | 12 | namespace switched_model { 13 | 14 | class SplineCpg { 15 | public: 16 | SplineCpg(CubicSpline::Node liftOff, scalar_t midHeight, CubicSpline::Node touchDown); 17 | 18 | SplineCpg(CubicSpline::Node liftOff, CubicSpline::Node midNode, CubicSpline::Node touchDown); 19 | 20 | scalar_t position(scalar_t time) const; 21 | 22 | scalar_t velocity(scalar_t time) const; 23 | 24 | scalar_t acceleration(scalar_t time) const; 25 | 26 | scalar_t startTimeDerivative(scalar_t time) const; 27 | 28 | scalar_t finalTimeDerivative(scalar_t time) const; 29 | 30 | private: 31 | scalar_t midTime_; 32 | CubicSpline leftSpline_; 33 | CubicSpline rightSpline_; 34 | }; 35 | 36 | } // namespace switched_model 37 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/initialization/ComKinoInitializer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "ocs2_switched_model_interface/core/ComModelBase.h" 6 | #include "ocs2_switched_model_interface/core/SwitchedModel.h" 7 | #include "ocs2_switched_model_interface/logic/SwitchedModelModeScheduleManager.h" 8 | 9 | namespace switched_model { 10 | 11 | class ComKinoInitializer : public ocs2::Initializer { 12 | public: 13 | using com_model_t = ComModelBase; 14 | 15 | ComKinoInitializer(const com_model_t& comModel, const SwitchedModelModeScheduleManager& modeScheduleManager); 16 | 17 | ~ComKinoInitializer() override = default; 18 | 19 | ComKinoInitializer* clone() const override; 20 | 21 | void compute(scalar_t time, const vector_t& state, scalar_t nextTime, vector_t& input, vector_t& nextState) override; 22 | 23 | protected: 24 | ComKinoInitializer(const ComKinoInitializer& rhs); 25 | 26 | private: 27 | std::unique_ptr comModelPtr_; 28 | const SwitchedModelModeScheduleManager* modeScheduleManagerPtr_; 29 | }; 30 | 31 | } // end of namespace switched_model 32 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/terrain/PlanarSignedDistanceField.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ocs2_switched_model_interface/core/SwitchedModel.h" 4 | #include "ocs2_switched_model_interface/terrain/SignedDistanceField.h" 5 | #include "ocs2_switched_model_interface/terrain/TerrainModel.h" 6 | 7 | namespace switched_model { 8 | 9 | /** 10 | * Implements a flat terrain signed distance field 11 | */ 12 | class PlanarSignedDistanceField : public SignedDistanceField { 13 | public: 14 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 15 | 16 | explicit PlanarSignedDistanceField(TerrainPlane terrainPlane); 17 | 18 | ~PlanarSignedDistanceField() override = default; 19 | PlanarSignedDistanceField* clone() const override { return new PlanarSignedDistanceField(*this); }; 20 | 21 | scalar_t value(const vector3_t& position) const override; 22 | 23 | vector3_t derivative(const vector3_t& position) const override; 24 | 25 | std::pair valueAndDerivative(const vector3_t& position) const override; 26 | 27 | protected: 28 | PlanarSignedDistanceField(const PlanarSignedDistanceField& other); 29 | 30 | private: 31 | TerrainPlane terrainPlane_; 32 | }; 33 | 34 | } // namespace switched_model 35 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/terrain/PlaneFitting.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 27.11.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include "ocs2_switched_model_interface/core/SwitchedModel.h" 8 | #include "ocs2_switched_model_interface/terrain/TerrainPlane.h" 9 | 10 | namespace switched_model { 11 | 12 | NormalAndPosition estimatePlane(const std::vector& regressionPoints); 13 | 14 | } // namespace switched_model 15 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/include/ocs2_switched_model_interface/terrain/SignedDistanceField.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 14.08.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include "ocs2_switched_model_interface/core/SwitchedModel.h" 8 | 9 | namespace switched_model { 10 | 11 | /** 12 | * This abstract class defines the interface for a signed distance field. 13 | */ 14 | class SignedDistanceField { 15 | public: 16 | SignedDistanceField() = default; 17 | virtual ~SignedDistanceField() = default; 18 | SignedDistanceField(const SignedDistanceField&) = delete; 19 | SignedDistanceField& operator=(const SignedDistanceField&) = delete; 20 | 21 | virtual SignedDistanceField* clone() const = 0; 22 | virtual scalar_t value(const vector3_t& position) const = 0; 23 | virtual Eigen::Vector3d derivative(const vector3_t& position) const = 0; 24 | virtual std::pair valueAndDerivative(const vector3_t& position) const = 0; 25 | }; 26 | 27 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_switched_model_interface 4 | 0.0.0 5 | The ocs2_switched_model_interface package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | cmake_clang_tools 16 | 17 | roscpp 18 | ocs2_core 19 | ocs2_oc 20 | ocs2_msgs 21 | ocs2_ros_interfaces 22 | ocs2_robotic_tools 23 | ocs2_switched_model_msgs 24 | 25 | 26 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/src/dynamics/ComKinoDynamicsParameters.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 04.06.21. 3 | // 4 | 5 | #include "ocs2_switched_model_interface/dynamics/ComKinoDynamicsParameters.h" 6 | 7 | namespace switched_model { 8 | 9 | template 10 | ComKinoSystemDynamicsParameters::ComKinoSystemDynamicsParameters( 11 | const Eigen::Matrix& parameterVector) 12 | : externalForceInOrigin(parameterVector.template segment<3>(0)), externalTorqueInBase(parameterVector.template segment<3>(3)) {} 13 | 14 | template 15 | Eigen::Matrix ComKinoSystemDynamicsParameters::asVector() const { 16 | Eigen::Matrix parameters(ComKinoSystemDynamicsParameters::getNumParameters()); 17 | parameters.template head<3>() = externalForceInOrigin; 18 | parameters.template tail<3>() = externalTorqueInBase; 19 | return parameters; 20 | } 21 | 22 | template class ComKinoSystemDynamicsParameters; 23 | template class ComKinoSystemDynamicsParameters; 24 | 25 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/src/initialization/ComKinoInitializer.cpp: -------------------------------------------------------------------------------- 1 | #include "ocs2_switched_model_interface/initialization/ComKinoInitializer.h" 2 | 3 | #include "ocs2_switched_model_interface/core/SwitchedModel.h" 4 | 5 | namespace switched_model { 6 | 7 | ComKinoInitializer::ComKinoInitializer(const com_model_t& comModel, const SwitchedModelModeScheduleManager& modeScheduleManager) 8 | : comModelPtr_(comModel.clone()), modeScheduleManagerPtr_(&modeScheduleManager) {} 9 | 10 | ComKinoInitializer::ComKinoInitializer(const ComKinoInitializer& rhs) 11 | : ocs2::Initializer(rhs), comModelPtr_(rhs.comModelPtr_->clone()), modeScheduleManagerPtr_(rhs.modeScheduleManagerPtr_) {} 12 | 13 | ComKinoInitializer* ComKinoInitializer::clone() const { 14 | return new ComKinoInitializer(*this); 15 | } 16 | 17 | void ComKinoInitializer::compute(scalar_t time, const vector_t& state, scalar_t nextTime, vector_t& input, vector_t& nextState) { 18 | const comkino_state_t comkinoState = state; 19 | const auto basePose = getBasePose(comkinoState); 20 | const auto contactFlags = modeScheduleManagerPtr_->getContactFlags(time); 21 | 22 | // Initial guess 23 | input = weightCompensatingInputs(*comModelPtr_, contactFlags, getOrientation(basePose)); 24 | 25 | nextState = state; 26 | } 27 | 28 | } // namespace switched_model 29 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/src/logic/DynamicsParametersSynchronizedModule.cpp: -------------------------------------------------------------------------------- 1 | #include "ocs2_switched_model_interface/logic/DynamicsParametersSynchronizedModule.h" 2 | 3 | namespace switched_model { 4 | 5 | DynamicsParametersSynchronizedModule::DynamicsParametersSynchronizedModule() 6 | : activeDynamicsParameters_(), 7 | newDynamicsParameters_(std::unique_ptr>( 8 | new ComKinoSystemDynamicsParameters(activeDynamicsParameters_))){}; 9 | 10 | void DynamicsParametersSynchronizedModule::preSolverRun(scalar_t initTime, scalar_t finalTime, const vector_t& initState, 11 | const ocs2::ReferenceManagerInterface& referenceManager) { 12 | auto lockedDynamicsParameterPtr = newDynamicsParameters_.lock(); 13 | activeDynamicsParameters_ = *lockedDynamicsParameterPtr; // Copy external parameters to the active parameter set 14 | } 15 | 16 | } // namespace switched_model -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/src/terrain/PlanarSignedDistanceField.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 08.09.22. 3 | // 4 | 5 | #include "ocs2_switched_model_interface/terrain/PlanarSignedDistanceField.h" 6 | 7 | namespace switched_model { 8 | 9 | PlanarSignedDistanceField::PlanarSignedDistanceField(TerrainPlane terrainPlane) : terrainPlane_(std::move(terrainPlane)) {} 10 | 11 | PlanarSignedDistanceField::PlanarSignedDistanceField(const PlanarSignedDistanceField& other) : terrainPlane_(other.terrainPlane_) {} 12 | 13 | scalar_t PlanarSignedDistanceField::value(const vector3_t& position) const { 14 | return terrainSignedDistanceFromPositionInWorld(position, terrainPlane_); 15 | } 16 | 17 | vector3_t PlanarSignedDistanceField::derivative(const vector3_t& position) const { 18 | return surfaceNormalInWorld(terrainPlane_); 19 | } 20 | 21 | std::pair PlanarSignedDistanceField::valueAndDerivative(const vector3_t& position) const { 22 | return {value(position), derivative(position)}; 23 | } 24 | 25 | } // namespace switched_model 26 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_interface/test/constraint/testZeroForceConstraint.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 19.09.19. 3 | // 4 | 5 | #include 6 | 7 | #include "ocs2_switched_model_interface/constraint/ZeroForceConstraint.h" 8 | #include "ocs2_switched_model_interface/logic/SwitchedModelModeScheduleManager.h" 9 | #include "ocs2_switched_model_interface/core/SwitchedModelPrecomputation.h" 10 | #include "ocs2_switched_model_interface/core/MotionPhaseDefinition.h" 11 | 12 | using namespace switched_model; 13 | 14 | TEST(TestZeroForceConstraint, evaluate) { 15 | // Mock the modeScheduleManager 16 | SwitchedModelModeScheduleManager modeScheduleManager(nullptr, nullptr, nullptr); 17 | modeScheduleManager.setModeSchedule({{},{ModeNumber::FLY}}); 18 | 19 | // Mock the precomputation 20 | SwitchedModelPreComputationMockup preComp; 21 | 22 | using TestedConstraint = ZeroForceConstraint; 23 | TestedConstraint zeroForceConstraint(0, modeScheduleManager); 24 | 25 | // evaluation point 26 | double t = 0.0; 27 | input_vector_t u; 28 | state_vector_t x; 29 | u.setZero(); 30 | x.setZero(); 31 | 32 | auto linearApproximation = zeroForceConstraint.getLinearApproximation(t, x, u, preComp); 33 | std::cout << "h: " << linearApproximation.f.transpose() << std::endl; 34 | std::cout << "dhdx: \n" << linearApproximation.dfdx << std::endl; 35 | std::cout << "dhdu: \n" << linearApproximation.dfdu << std::endl; 36 | } 37 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.0) 2 | project(ocs2_switched_model_msgs) 3 | 4 | set(CATKIN_PACKAGE_DEPENDENCIES 5 | std_msgs 6 | ocs2_msgs 7 | ) 8 | 9 | find_package(catkin REQUIRED COMPONENTS 10 | ${CATKIN_PACKAGE_DEPENDENCIES} 11 | message_generation 12 | ) 13 | 14 | # Declare the message files to be built 15 | add_message_files(DIRECTORY msg FILES 16 | gait.msg 17 | gait_sequence.msg 18 | scheduled_gait_sequence.msg 19 | ) 20 | 21 | # Declare the service files to be built 22 | add_service_files(DIRECTORY srv FILES 23 | trajectory_request.srv 24 | ) 25 | 26 | # Actually generate the language-specific message and service files 27 | generate_messages(DEPENDENCIES 28 | ${CATKIN_PACKAGE_DEPENDENCIES} 29 | ) 30 | 31 | # Declare that this catkin package's runtime dependencies 32 | catkin_package(CATKIN_DEPENDS 33 | ${CATKIN_PACKAGE_DEPENDENCIES} 34 | message_runtime 35 | ) 36 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_msgs/msg/gait.msg: -------------------------------------------------------------------------------- 1 | # Gait message 2 | 3 | float32[] eventPhases # event phases: length equal to modesequence's - 1. Values within [0,1] 4 | int8[] modeSequence # mode sequence: e.g., for a quadrupedal robot, it is in the set {0, 1,..., 15} 5 | float32 duration 6 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_msgs/msg/gait_sequence.msg: -------------------------------------------------------------------------------- 1 | # Sequence of gaits 2 | 3 | gait[] gaits 4 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_msgs/msg/scheduled_gait_sequence.msg: -------------------------------------------------------------------------------- 1 | # Scheduled list of gaits 2 | 3 | float32 startTime 4 | gait_sequence gaitSequence 5 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | ocs2_switched_model_msgs 3 | 0.0.1 4 | Provides ocs2_switched_model_msgs 5 | 6 | Marko Bjelonic 7 | Ruben Grandia 8 | Oliver Harley 9 | Oliver Harley 10 | 11 | TODO 12 | 13 | catkin 14 | message_generation 15 | std_msgs 16 | ocs2_msgs 17 | message_runtime 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/ocs2_switched_model_msgs/srv/trajectory_request.srv: -------------------------------------------------------------------------------- 1 | # Trajectory request service 2 | 3 | ocs2_msgs/mpc_target_trajectories trajectory # The trajectory to track 4 | gait_sequence gaitSequence # The gait 5 | --- 6 | bool success # 1 if successful 0 if trajectory couldn't be started. 7 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/segmented_planes_terrain_model/include/segmented_planes_terrain_model/SegmentedPlanesTerrainVisualization.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rgrandia on 24.06.20. 3 | // 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | namespace switched_model { 14 | 15 | visualization_msgs::MarkerArray getConvexTerrainMarkers(const ConvexTerrain& convexTerrain, ocs2::Color color, double linewidth, 16 | double normalLength); 17 | 18 | } // namespace switched_model 19 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_perceptive_anymal/segmented_planes_terrain_model/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | segmented_planes_terrain_model 4 | 0.0.0 5 | The segmented_planes_terrain_model package 6 | 7 | Ruben Grandia 8 | 9 | TODO 10 | 11 | catkin 12 | convex_plane_decomposition 13 | convex_plane_decomposition_msgs 14 | convex_plane_decomposition_ros 15 | grid_map_filters_rsl 16 | grid_map_ros 17 | grid_map_sdf 18 | ocs2_ros_interfaces 19 | ocs2_switched_model_interface 20 | roscpp 21 | sensor_msgs 22 | visualization_msgs 23 | 24 | 25 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor/auto_generated/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | 6 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_quadrotor 4 | 0.0.0 5 | The ocs2_quadrotor package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | roslib 16 | pybind11_catkin 17 | 18 | ocs2_mpc 19 | ocs2_ddp 20 | ocs2_robotic_tools 21 | ocs2_robotic_assets 22 | ocs2_python_interface 23 | 24 | 25 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | setup_args = generate_distutils_setup( 7 | packages=['ocs2_quadrotor'], 8 | package_dir={'': 'src'} 9 | ) 10 | 11 | setup(**setup_args) 12 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor/src/ocs2_quadrotor/__init__.py: -------------------------------------------------------------------------------- 1 | from ocs2_quadrotor.QuadrotorPyBindings import mpc_interface 2 | from ocs2_quadrotor.QuadrotorPyBindings import scalar_array, vector_array, matrix_array, TargetTrajectories 3 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor/src/pyBindModule.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | CREATE_ROBOT_PYTHON_BINDINGS(ocs2::quadrotor::QuadrotorPyBindings, QuadrotorPyBindings) 5 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor_ros/launch/multiplot.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor_ros/launch/quadrotor.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor_ros/launch/visualize.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_quadrotor_ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_quadrotor_ros 4 | 0.0.0 5 | The ocs2_quadrotor_ros package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | roslib 16 | tf 17 | 18 | ocs2_mpc 19 | ocs2_ros_interfaces 20 | ocs2_robotic_tools 21 | ocs2_robotic_assets 22 | ocs2_quadrotor 23 | 24 | 25 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_robotic_examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(ocs2_robotic_examples) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /ocs2_robotic_examples/ocs2_robotic_examples/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_robotic_examples 4 | 0.0.0 5 | The ocs2_robotic_examples metapackage 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | ocs2_ballbot 16 | ocs2_ballbot_ros 17 | ocs2_cartpole 18 | ocs2_cartpole_ros 19 | ocs2_double_integrator 20 | ocs2_double_integrator_ros 21 | ocs2_quadrotor 22 | ocs2_quadrotor_ros 23 | ocs2_mobile_manipulator 24 | ocs2_mobile_manipulator_ros 25 | ocs2_anymal 26 | ocs2_legged_robot 27 | ocs2_legged_robot_ros 28 | xacro 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /ocs2_robotic_tools/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_robotic_tools 4 | 0.0.0 5 | The ocs2_robotic_tools package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | TODO 12 | 13 | catkin 14 | 15 | cmake_clang_tools 16 | ocs2_core 17 | ocs2_oc 18 | ocs2_core 19 | ocs2_oc 20 | 21 | 22 | -------------------------------------------------------------------------------- /ocs2_robotic_tools/src/lintTarget.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | // #include 3 | #include 4 | #include 5 | 6 | // dummy target for clang toolchain 7 | int main() { 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /ocs2_ros_interfaces/launch/performance_indices.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /ocs2_ros_interfaces/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ocs2_ros_interfaces 6 | 0.0.0 7 | The ocs2 communication interfaces to ROS 8 | 9 | TODO 10 | Farbod Farshidian 11 | Jan Carius 12 | Ruben Grandia 13 | 14 | catkin 15 | 16 | cmake_modules 17 | cmake_clang_tools 18 | 19 | roscpp 20 | ocs2_msgs 21 | ocs2_core 22 | ocs2_mpc 23 | std_msgs 24 | visualization_msgs 25 | geometry_msgs 26 | interactive_markers 27 | rqt_multiplot 28 | 29 | 30 | -------------------------------------------------------------------------------- /ocs2_ros_interfaces/src/lintTarget.cpp: -------------------------------------------------------------------------------- 1 | // command 2 | #include 3 | #include 4 | #include 5 | 6 | // common 7 | #include 8 | #include 9 | 10 | // mpc 11 | #include 12 | 13 | // mrt 14 | #include 15 | #include 16 | #include 17 | 18 | // synchronized_module 19 | #include 20 | #include 21 | 22 | // dummy target for clang toolchain 23 | int main() { 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /ocs2_slp/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_slp 4 | 0.0.0 5 | A numerical implementation of a first order primal-dual MPC basee on PIPG. 6 | 7 | Farbod Farshidian 8 | Zhengyu Fu 9 | 10 | BSD3 11 | 12 | catkin 13 | ocs2_core 14 | ocs2_mpc 15 | ocs2_oc 16 | 17 | 18 | ocs2_qp_solver 19 | 20 | -------------------------------------------------------------------------------- /ocs2_sqp/blasfeo_catkin/cmake/blasfeo-extras.cmake.in: -------------------------------------------------------------------------------- 1 | # Forward BLASFEO_PATH explicitly 2 | set(BLASFEO_PATH @BLASFEO_DEVEL_PREFIX@) 3 | -------------------------------------------------------------------------------- /ocs2_sqp/blasfeo_catkin/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | blasfeo_catkin 4 | 0.0.0 5 | Catkin wrapper for Blasfeo. 6 | Ruben Grandia 7 | 8 | See package 9 | 10 | catkin 11 | 12 | -------------------------------------------------------------------------------- /ocs2_sqp/hpipm_catkin/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | hpipm_catkin 4 | 0.0.0 5 | Catkin wrapper for HPIPM. 6 | Ruben Grandia 7 | 8 | See package 9 | 10 | catkin 11 | ocs2_core 12 | ocs2_qp_solver 13 | blasfeo_catkin 14 | 15 | 16 | -------------------------------------------------------------------------------- /ocs2_sqp/ocs2_sqp/README.md: -------------------------------------------------------------------------------- 1 | # OCS2 SQP 2 | This package contains a multiple-shooting, sequential-quadratic-programming solver for problems defined with the OCS2 toolbox. 3 | 4 | ## Dependencies 5 | HPIPM is used as solver for the QP subproblems. Both HPIPM and Blasfeo are automatically installed and wrapped into catkin convention 6 | in the blasfeo_catkin and hpipm_catkin packages. -------------------------------------------------------------------------------- /ocs2_sqp/ocs2_sqp/doc/LQR_full.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_sqp/ocs2_sqp/doc/LQR_full.pdf -------------------------------------------------------------------------------- /ocs2_sqp/ocs2_sqp/doc/deduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leggedrobotics/ocs2/164c26b46bed5d24cd03d90588db8980d03a4951/ocs2_sqp/ocs2_sqp/doc/deduction.pdf -------------------------------------------------------------------------------- /ocs2_sqp/ocs2_sqp/logging/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | 3 | # virtualenv 4 | venv/ -------------------------------------------------------------------------------- /ocs2_sqp/ocs2_sqp/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_sqp 4 | 0.0.0 5 | The ocs2_hpipm package 6 | 7 | huier 8 | 9 | TODO 10 | 11 | catkin 12 | ocs2_core 13 | ocs2_mpc 14 | ocs2_oc 15 | ocs2_qp_solver 16 | blasfeo_catkin 17 | hpipm_catkin 18 | 19 | 20 | -------------------------------------------------------------------------------- /ocs2_test_tools/ocs2_qp_solver/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_qp_solver 4 | 0.0.0 5 | The ocs2_qp_solver package 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | BSD 12 | 13 | catkin 14 | cmake_clang_tools 15 | ocs2_core 16 | ocs2_oc 17 | 18 | 19 | -------------------------------------------------------------------------------- /ocs2_thirdparty/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(ocs2_thirdparty) 3 | 4 | find_package(catkin) 5 | 6 | catkin_package( 7 | INCLUDE_DIRS 8 | include 9 | ) 10 | 11 | install(DIRECTORY include/ 12 | DESTINATION "${CATKIN_PACKAGE_INCLUDE_DESTINATION}/../") 13 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/COPYING: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-18 Bradley M. Bell 3 | 4 | CppAD is distributed under the terms of the 5 | Eclipse Public License Version 2.0. 6 | 7 | This Source Code may also be made available under the following 8 | Secondary License when the conditions for such availability set forth 9 | in the Eclipse Public License, Version 2.0 are satisfied: 10 | GNU General Public License, Version 2.0 or later. 11 | ----------------------------------------------------------------------------- 12 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/Version.txt: -------------------------------------------------------------------------------- 1 | CPPAD version: 2 | repository: https://github.com/coin-or/CppAD/tree/stable/20190200 3 | tag: 20190200.5 4 | commit_hash: 6d82707ef4847d4cb3bf27a4671918ee618512fd -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/authors: -------------------------------------------------------------------------------- 1 | Statement of CppAD Authorship and Copyright 2 | =========================================== 3 | 4 | Bradley M. Bell is the sole author of CppAD. 5 | While Bradley M. Bell worked for the University of Washington during 6 | the development of CppAD, the following are also true: 7 | 8 | 1. The CppAD package was not written or maintained as part of any sponsored 9 | grant at the University of Washington. 10 | 11 | 2. Bradley M. Bell was not paid by the University of Washington for the time 12 | he worked on CppAD. 13 | 14 | 3. Working on CppAD was not part of Bradley M. Bell's normal duties at for the 15 | University of Washington. 16 | 17 | Thus, in accordance with Section 2 of the University of Washington's copyright 18 | policy (see the file uw_copy_040507.html in this directory) Bradley M. Bell is 19 | the copyright holder for CppAD. 20 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_INCLUDED 2 | #define CPPAD_CG_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2015 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | #include 19 | 20 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/AUTHORS: -------------------------------------------------------------------------------- 1 | Statement of CppADCodeGen Authorship and Copyright 2 | ================================================== 3 | 4 | CppADCodeGen source is developed by Joao Rui Leal. 5 | CppAD source code is developed by Bradley M. Bell. 6 | 7 | CppADCodeGen copyright holder is Ciengis, SA, while the original CppAD 8 | library copyright holder is Bradley M. Bell. 9 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/COPYING: -------------------------------------------------------------------------------- 1 | CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 2 | Copyright (C) 2018 Joao Leal 3 | Copyright (C) 2012 Ciengis 4 | 5 | CppADCodeGen is distributed under multiple licenses: 6 | 7 | - Eclipse Public License Version 1.0 (EPL1), and 8 | - GNU General Public License Version 3 (GPL3). 9 | 10 | EPL1 terms and conditions can be found in the file epl-v10.txt, while 11 | terms and conditions for the GPL3 can be found in the file gpl3.txt. 12 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/Version.txt: -------------------------------------------------------------------------------- 1 | CPPAD Codegen version: 2 | repository: https://github.com/joaoleal/CppADCodeGen 3 | commit_hash: f3680f154c32f269123e6eea1531bb9030ad40ba -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/debug.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_DEBUG_INCLUDED 2 | #define CPPAD_CG_DEBUG_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2012 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | #ifndef CPPADCG_DEBUG_VARIABLE_CHECKID 19 | #define CPPADCG_DEBUG_VARIABLE_CHECKID(id) 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/extra/extra.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_EXTRA_INCLUDED 2 | #define CPPAD_CG_EXTRA_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2013 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | #include 19 | 20 | #include 21 | #include 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/lang/c/language_c_double.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_LANGUAGE_C_DOUBLE_INCLUDED 2 | #define CPPAD_CG_LANGUAGE_C_DOUBLE_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2012 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | namespace CppAD { 19 | namespace cg { 20 | 21 | /** 22 | * Specialization of the C language function names for doubles 23 | * 24 | * @author Joao Leal 25 | */ 26 | template<> 27 | inline const std::string& LanguageC::absFuncName() { 28 | static const std::string name("fabs"); 29 | return name; 30 | } 31 | 32 | template<> 33 | inline const std::string& LanguageC::getPrintfBaseFormat() { 34 | static const std::string format("%f"); 35 | return format; 36 | } 37 | 38 | } // END cg namespace 39 | } // END CppAD namespace 40 | 41 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/lang/dot/dot.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_DOT_INCLUDED 2 | #define CPPAD_CG_DOT_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2016 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | // --------------------------------------------------------------------------- 19 | // dot source code generation 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/lang/latex/latex.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_LATEX_INCLUDED 2 | #define CPPAD_CG_LATEX_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2014 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | // --------------------------------------------------------------------------- 19 | // latex source code generation 20 | #include 21 | #include 22 | #include 23 | #include 24 | //#include 25 | //#include 26 | #include 27 | 28 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/lang/mathml/mathml.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_MATHML_INCLUDED 2 | #define CPPAD_CG_MATHML_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2015 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | // --------------------------------------------------------------------------- 19 | // mathml source code generation 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/model/dynamic_lib/archiver.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_ARCHIVER_INCLUDED 2 | #define CPPAD_CG_ARCHIVER_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2013 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | #include 19 | 20 | namespace CppAD { 21 | namespace cg { 22 | 23 | /** 24 | * A tool used to create static libraries from object files 25 | */ 26 | class Archiver { 27 | public: 28 | virtual bool isVerbose() const = 0; 29 | 30 | virtual void setVerbose(bool verbose) = 0; 31 | 32 | virtual void create(const std::string& library, 33 | const std::set& objectFiles, 34 | JobTimer* timer = nullptr) = 0; 35 | 36 | inline virtual ~Archiver() { 37 | }; 38 | }; 39 | 40 | } // END cg namespace 41 | } // END CppAD namespace 42 | 43 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/model/dynamic_lib/dynamiclib.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_DYNAMICLIB_INCLUDED 2 | #define CPPAD_CG_DYNAMICLIB_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2012 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | namespace CppAD { 19 | namespace cg { 20 | 21 | /** 22 | * Abstract class used to load compiled models in a dynamic library 23 | * 24 | * @author Joao Leal 25 | */ 26 | template 27 | class DynamicLib : public FunctorModelLibrary { 28 | public: 29 | 30 | inline virtual ~DynamicLib() { 31 | } 32 | 33 | }; 34 | 35 | } // END cg namespace 36 | } // END CppAD namespace 37 | 38 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/model/threadpool/multi_threading_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_MULTITHREADINGTYPE_INCLUDED 2 | #define CPPAD_CG_MULTITHREADINGTYPE_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2016 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | namespace CppAD { 19 | namespace cg { 20 | 21 | enum class MultiThreadingType { 22 | NONE, // no multithreading 23 | OPENMP, // using the OpenMP library (does not work on dynamically loaded model libraries) 24 | PTHREADS // using the PThreads library 25 | }; 26 | 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/model/threadpool/thread_pool_schedule_strategy.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_THREAD_POOL_SCHEDULE_STRATEGY_INCLUDED 2 | #define CPPAD_CG_THREAD_POOL_SCHEDULE_STRATEGY_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2016 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | namespace CppAD { 19 | namespace cg { 20 | 21 | enum class ThreadPoolScheduleStrategy { 22 | STATIC = 1, // all jobs are assigned to a thread at the beginning 23 | DYNAMIC = 2, // each thread only executes a single job at a time 24 | GUIDED = 3 // each thread can execute multiple jobs before returning to the pool 25 | }; 26 | 27 | } 28 | } 29 | 30 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/nan.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_NAN_HPP 2 | #define CPPAD_CG_NAN_HPP 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2013 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | namespace CppAD { 19 | 20 | template 21 | inline bool isnan(const cg::CG &s) { 22 | using namespace CppAD::cg; 23 | 24 | if (s.isVariable()) { 25 | return false; 26 | } else { 27 | // a parameter 28 | const Base& v = s.getValue(); 29 | return (v != v); 30 | } 31 | } 32 | 33 | } // END CppAD namespace 34 | 35 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/cg/unary.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CPPAD_CG_UNARY_INCLUDED 2 | #define CPPAD_CG_UNARY_INCLUDED 3 | /* -------------------------------------------------------------------------- 4 | * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation: 5 | * Copyright (C) 2012 Ciengis 6 | * 7 | * CppADCodeGen is distributed under multiple licenses: 8 | * 9 | * - Eclipse Public License Version 1.0 (EPL1), and 10 | * - GNU General Public License Version 3 (GPL3). 11 | * 12 | * EPL1 terms and conditions can be found in the file "epl-v10.txt", while 13 | * terms and conditions for the GPL3 can be found in the file "gpl3.txt". 14 | * ---------------------------------------------------------------------------- 15 | * Author: Joao Leal 16 | */ 17 | 18 | namespace CppAD { 19 | namespace cg { 20 | 21 | template 22 | inline CG CG::operator+() const { 23 | return CG (*this); // nothing to do 24 | } 25 | 26 | template 27 | inline CG CG::operator-() const { 28 | if (isParameter()) { 29 | return CG (-getValue()); 30 | 31 | } else { 32 | CodeHandler& h = *getCodeHandler(); 33 | CG result(*h.makeNode(CGOpCode::UnMinus, this->argument())); 34 | if (isValueDefined()) { 35 | result.setValue(-getValue()); 36 | } 37 | return result; 38 | } 39 | } 40 | 41 | } // END cg namespace 42 | } // END CppAD namespace 43 | 44 | #endif -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/core/ad_type.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_CORE_AD_TYPE_HPP 2 | # define CPPAD_CORE_AD_TYPE_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-18 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | 15 | namespace CppAD { // BEGIN_CPPAD_NAMESPACE 16 | /*! 17 | \file ad_type.hpp 18 | Define the enum type ad_type_enum 19 | */ 20 | 21 | /// The ad_type_enum type 22 | typedef enum { 23 | constant_enum, 24 | dynamic_enum, 25 | variable_enum 26 | } 27 | ad_type_enum; 28 | 29 | } // END_CPPAD_NAMESPACE 30 | # endif 31 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/core/arithmetic.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_CORE_ARITHMETIC_HPP 2 | # define CPPAD_CORE_ARITHMETIC_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | 15 | /* 16 | ------------------------------------------------------------------------------- 17 | $begin Arithmetic$$ 18 | $spell 19 | Op 20 | const 21 | $$ 22 | 23 | 24 | 25 | $section AD Arithmetic Operators and Compound Assignments$$ 26 | 27 | $childtable% 28 | include/cppad/core/unary_plus.hpp% 29 | include/cppad/core/unary_minus.hpp% 30 | include/cppad/core/ad_binary.hpp% 31 | include/cppad/core/compound_assign.hpp 32 | %$$ 33 | 34 | $end 35 | ------------------------------------------------------------------------------- 36 | */ 37 | # include 38 | # include 39 | # include 40 | # include 41 | 42 | # endif 43 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/core/drivers.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_CORE_DRIVERS_HPP 2 | # define CPPAD_CORE_DRIVERS_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | 22 | # endif 23 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/core/fun_eval.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_CORE_FUN_EVAL_HPP 2 | # define CPPAD_CORE_FUN_EVAL_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-18 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | 15 | # include 16 | # include 17 | # include 18 | # include 19 | 20 | # endif 21 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/example/eigen_plugin.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_EXAMPLE_EIGEN_PLUGIN_HPP 2 | # define CPPAD_EXAMPLE_EIGEN_PLUGIN_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | /*$ 15 | $begin eigen_plugin.hpp$$ 16 | $spell 17 | eigen_plugin.hpp 18 | typedef 19 | $$ 20 | 21 | $section Source Code for eigen_plugin.hpp$$ 22 | $srccode%cpp% */ 23 | // Declaration needed, before eigen-3.3.3, so Eigen vector is a simple vector 24 | typedef Scalar value_type; 25 | /* %$$ 26 | $end 27 | */ 28 | # endif 29 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/local/atom_state.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_LOCAL_ATOM_STATE_HPP 2 | # define CPPAD_LOCAL_ATOM_STATE_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | 15 | namespace CppAD { namespace local { // BEGIN_CPPAD_LOCAL_NAMESPACE 16 | 17 | enum enum_atom_state { 18 | /// next AFunOp marks beginning of a atomic function call 19 | start_atom, 20 | 21 | /// next FunapOp (FunavOp) is a parameter (variable) argument 22 | arg_atom, 23 | 24 | /// next FunrpOp (FunrvOp) is a parameter (variable) result 25 | ret_atom, 26 | 27 | /// next AFunOp marks end of a atomic function call 28 | end_atom 29 | }; 30 | 31 | } } // END_CPPAD_LOCAL_NAMESPACE 32 | # endif 33 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/local/optimize/size_pair.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_LOCAL_OPTIMIZE_SIZE_PAIR_HPP 2 | # define CPPAD_LOCAL_OPTIMIZE_SIZE_PAIR_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | /*! 15 | \file size_pair.hpp 16 | Information for one variable and one operation sequence. 17 | */ 18 | // BEGIN_CPPAD_LOCAL_OPTIMIZE_NAMESPACE 19 | namespace CppAD { namespace local { namespace optimize { 20 | 21 | /*! 22 | \file size_pair.hpp 23 | Information for one variable in one operation sequence. 24 | */ 25 | struct struct_size_pair { 26 | size_t i_op; /// operator index for this variable 27 | size_t i_var; /// variable index for this variable 28 | }; 29 | 30 | } } } // END_CPPAD_LOCAL_OPTIMIZE_NAMESPACE 31 | 32 | # endif 33 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/cppad/local/play/addr_enum.hpp: -------------------------------------------------------------------------------- 1 | # ifndef CPPAD_LOCAL_PLAY_ADDR_ENUM_HPP 2 | # define CPPAD_LOCAL_PLAY_ADDR_ENUM_HPP 3 | /* -------------------------------------------------------------------------- 4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-18 Bradley M. Bell 5 | 6 | CppAD is distributed under the terms of the 7 | Eclipse Public License Version 2.0. 8 | 9 | This Source Code may also be made available under the following 10 | Secondary License when the conditions for such availability set forth 11 | in the Eclipse Public License, Version 2.0 are satisfied: 12 | GNU General Public License, Version 2.0 or later. 13 | ---------------------------------------------------------------------------- */ 14 | 15 | // BEGIN_CPPAD_LOCAL_PLAY_NAMESPACE 16 | namespace CppAD { namespace local { namespace play { 17 | 18 | /*! 19 | \file addr_enum.hpp 20 | */ 21 | /// enum corresponding to type used for addressing iterators for a player 22 | enum addr_enum { 23 | unsigned_short_enum , 24 | unsigned_int_enum , 25 | size_t_enum 26 | }; 27 | 28 | } } } // BEGIN_CPPAD_LOCAL_PLAY_NAMESPACE 29 | 30 | # endif 31 | -------------------------------------------------------------------------------- /ocs2_thirdparty/include/iit/rbd/types.h: -------------------------------------------------------------------------------- 1 | /* CPYHDR { */ 2 | /* 3 | * This file is part of the 'iit-rbd' library. 4 | * Copyright (c) 2015 2016, Marco Frigerio (marco.frigerio@iit.it) 5 | * 6 | * See the LICENSE file for more information. 7 | */ 8 | /* } CPYHDR */ 9 | #ifndef IIT_RBD_TYPES_H_ 10 | #define IIT_RBD_TYPES_H_ 11 | 12 | #include "rbd.h" 13 | #include "InertiaMatrix.h" 14 | 15 | 16 | namespace iit { 17 | namespace rbd { 18 | 19 | #define TPL template 20 | 21 | TPL using Velocity = typename Core::VelocityVector; 22 | TPL using Force = typename Core::ForceVector; 23 | TPL using Mat33 = typename Core::Matrix33; 24 | TPL using Mat66 = typename Core::Matrix66; 25 | TPL using Vec3 = typename Core::Vector3; 26 | TPL using Vec6 = typename Core::Vector6; 27 | 28 | TPL using InertiaMat = tpl::InertiaMatrixDense; 29 | 30 | #undef TPL 31 | 32 | } 33 | } 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /ocs2_thirdparty/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ocs2_thirdparty 4 | 0.0.1 5 | Package containing third party libraries that OCS2 uses. 6 | 7 | Farbod Farshidian 8 | Jan Carius 9 | Ruben Grandia 10 | 11 | Check individual license files for each library 12 | 13 | catkin 14 | cmake_modules 15 | 16 | 17 | 18 | --------------------------------------------------------------------------------