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

Best way to mix C++ and Python in same package

asked 2022-07-29 09:34:14 -0500

sadsim gravatar image

Hi,

I'm trying to set up a SLAM pipeline while also investigating a new sensor signal processing modality. Most of my signal processing is done in Python because I'm much more comfortable using Python for that. Additionally, there is a lot of existing libraries for scientific computing in Python.

Unfortunately no real python bindings exist for the pointcloud library (PCL), so I would need to perform the scan matching in C++.

What is the coexistence story for ROS1 (noetic) and Python in the same application? Is it possible to use venv?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-08-04 15:18:37 -0500

Alex-SSoM gravatar image

You could write some library code in C++ then generate python bindings to be called from your python node. Obviously this will increase the complexity of your package and the debugging time as the issues may come from the C++ code, the binding or the python node.

While it's feasible, I wouldn't personally chose to go that route but it all depends on your C++ proficiency.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-07-29 09:34:14 -0500

Seen: 645 times

Last updated: Aug 04 '22