Skip to content

Latest commit

 

History

History
72 lines (59 loc) · 1.6 KB

README.md

File metadata and controls

72 lines (59 loc) · 1.6 KB

acados_vendor_ros2

Simple ros2 vendor for Acados.

version CI (humble) Build tests (jazzy) Build tests (rolling)

Installation

mkdir ros2_ws/src
cd ros2_ws/src
git clone https://github.com/ICube-Robotics/acados_vendor_ros2.git

# Download the source and install the c interface (lib "acados")
cd ..
rosdep install --ignore-src --from-paths . -y -r
colcon build

NOTE: If the ament_cmake_vendor_package is missing, you can install it manually:

sudo apt install ros-<ROS_DISTRO>-ament-cmake-vendor-package

Usage

For a C++ project

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);
...

For a Python project

package.xml :

...
<depend>acados_vendor_ros2</depend>
...

setup.py : Nothing special.

XXX.py :

from acados_template import AcadosModel, AcadosOcp
...
model = AcadosModel()
...