Simple ros2 vendor for Acados.
git clone https://github.com/ICube-Robotics/acados_vendor_ros2.git
cd acados_vendor_ros2
rosdep install --from-paths . -y --ignore-src
colcon build
git clone https://github.com/ICube-Robotics/acados_vendor_ros2.git
cd acados_vendor_ros2
PIP_BREAK_SYSTEM_PACKAGES=1 rosdep install --from-paths . -y --ignore-src
colcon build
Tip
Since Ubuntu 24.04, pip restricts installing Python packages to system locations by default.
The PIP_BREAK_SYSTEM_PACKAGES=1
flag allows rosdep
to install Python dependencies even when system Python is used.
You can avoid using the flag if you manually install the casadi
binaries beforehand as a system package or if you use a virtual environment (later option recommended).
package.xml
:
...
<depend>acados_vendor_ros2</depend>
...
CMakeLists.txt
:
...
find_package(acados_vendor_ros2)
...
ament_target_dependencies(<the_target> PUBLIC acados_vendor_ros2)
...
xxx.cpp
:
#include "acados_c/ocp_nlp_interface.h"
...
ocp_nlp_plan_t* plan_ptr = ocp_nlp_plan_create(N);
...
package.xml
:
...
<depend>acados_vendor_ros2</depend>
...
setup.py
: Nothing special.
XXX.py
:
from acados_template import AcadosModel, AcadosOcp
...
model = AcadosModel()
...