No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
Repository Summary
Description | CDDP-MPC package without any external installation for ROS2 Humble |
Checkout URI | https://github.com/astomodynamics/cddp_mpc.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2024-12-27 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | robot cpp eigen ros mpc model-predictive-control ros2-humble cddp |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
cddp_mpc | 0.0.0 |
README
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
- Create a ROS workspace and navigate to it:
mkdir ros_ws && cd ros_ws
2. Create the source directory and clone the repository:
```bash
mkdir src && cd src
git clone https://github.com/astomodynamics/cddp_mpc
- 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:
- Clone the CDDP C++ repository:
git clone https://github.com/astomodynamics/cddp-cpp
- 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.
- Launch the MPC Node In your first terminal, start the MPC node:
ros2 run cddp_mpc mpc_node
- In a second terminal, publish the initial pose:
ros2 topic pub /pose geometry_msgs/msg/PoseStamped '{
header: {
stamp: {sec: 0, nanosec: 0},
frame_id: "map"
},
pose: {
position: {x: 0.0, y: 0.0, z: 0.0},
orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}
}
}'
- Publish Goal Pose In a third terminal, publish the goal pose:
ros2 topic pub /goal_pose geometry_msgs/msg/PoseStamped '{
header: {
stamp: {sec: 0, nanosec: 0},
frame_id: "map"
},
pose: {
position: {x: 2.0, y: 2.0, z: 0.0},
orientation: {x: 0.0, y: 0.0, z: 0.02030303113745028, w: 0.9997938722189849}
}
}'
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.
CONTRIBUTING
No CONTRIBUTING.md found.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.