This repository contains the source code for the ROS Client Library for C++ package, included with a standard install of any ROS 2 distro.
rclcpp provides the standard C++ API for interacting with ROS 2.
Installation
sudo apt install --allow-downgrades -y ./*.deb ./*.ddeb
sudo apt-mark hold ros-humble-rclcpp ros-humble-rclcpp-action ros-humble-rclcpp-components ros-humble-rclcpp-lifecycle
Building autoware
export CFLAGS="-Wno-error=deprecated-declarations"
export CPPFLAGS="-Wno-error=deprecated-declarations"
export CXXFLAGS="-Wno-error=deprecated-declarations"
export CFLAGS+=" -Wno-error=pedantic"
export CPPFLAGS+=" -Wno-error=pedantic"
export CXXFLAGS+=" -Wno-error=pedantic"
colcon build --cmake-clean-cache --cmake-clean-first --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
Usage
#include "rclcpp/rclcpp.hpp" allows use of the most common elements of the ROS 2 system.
The link to the latest API documentation can be found on the rclcpp package info page, at the ROS Index.
Examples
The ROS 2 tutorials Writing a simple publisher and subscriber. and Writing a simple service and client contain some examples of rclcpp APIs in use.