Skip to content

astomodynamics/cddp_mpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDDP MPC Package

A ROS package implementing Constrained Differential Dynamic Programming (CDDP) for Model Predictive Control (MPC).

Description

This package provides a ROS implementation of CDDP-based Model Predictive Control. It integrates with the CDDP C++ library to enable real-time optimal control for robotic systems.

Prerequisites

  • ROS 2 (tested on ROS 2 Humble)
  • C++17 or later
  • CMake 3.8 or later
  • [Optional] CDDP C++ Library

Installation

Build cddp_mpc_pkg

  1. Create a ROS workspace and navigate to it:
mkdir ros_ws && cd ros_ws```
  1. Create the source directory and clone the repository:
mkdir src && cd src
git clone https://github.com/astomodynamics/cddp_mpc
  1. Return to the workspace root and build the package:
cd ../ # to ~/ros_ws
colcon build --packages-select cddp_mpc

[Optional] Build CDDP C++ Library

If you want to use the standalone CDDP C++ library:

  1. Clone the CDDP C++ repository:
git clone https://github.com/astomodynamics/cddp-cpp
  1. Build the library:
cd cddp-cpp
mkdir build && cd build
cmake ..
make

Usage

After building the package, source your ROS workspace:

source ~/ros_ws/install/setup.bash

Running the Controller

To test the CDDP MPC controller, you'll need to run commands in three separate terminals.

  1. Launch the Robot Node
ros2 launch cddp_mpc simple_robot_bringup.launch.py
  1. Launch the MPC Node

In your first terminal, start the MPC node:

ros2 run cddp_mpc mpc_node
  1. Select the robot goal at Rviz2

Contributing

Contributions are welcome! Please feel free to submit pull requests.

Citing

If you use this work in an academic context, please cite this repository.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

ROS2 Humble CDDP-MPC package without any addtional installation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published