ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

C++ bindings for python in ros 2

asked 2018-07-16 00:45:50 -0500

Skyking gravatar image

Since boost is no longer used in ROS 2 , what will be the preferred method for binding C++ code with python ? In ROS 1, we were using boost/python.hpp, what is the suitable option in ROS 2.0 ?

edit retag flag offensive close merge delete


I don't believe there currently is a default/recommended library or framework for Python binding with ROS 2, but I've seen people use pybind/pybind11.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-16 01:45:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-19 00:50:13 -0500

ahendrix gravatar image

Even though the core ROS2 libraries no longer use boost, you're free to use it in your own packages.

It looks like rclpy (the ROS2 Python client library) is using the cPython API: , so that may be another alternative for you.

edit flag offensive delete link more

Question Tools



Asked: 2018-07-16 00:45:50 -0500

Seen: 728 times

Last updated: Jul 19 '18