Introduction to ROS 2 client libraries
The ROS 2 concepts we have seen in this chapter can be implemented in our nodes. We can create any number of topics, services, actions, and parameters in our ROS nodes. So, how can we implement these concepts in our program? The answer is ROS 2 client libraries. ROS 2 comes with a set of libraries called client libraries. These libraries provide APIs that allow users to implement all the concepts in ROS 2. There are two popular client libraries that ROS 2 officially supports. Those are rclcpp
and rclpy
. The rclcpp
library is the client library for C++, and rclpy
is the client library for Python. As developers, we only need to learn the APIs provided by these libraries to implement ROS 2 nodes.
We can choose the client library for our application. If you are working with faster and more efficient code, you can go with the C++ client library, and if you require faster development time, you can go with Python. One important thing to note is...