- 2017/5/23
when implementing the simulation for 'Heatmap' , you can download it by ' git clone https://github.com/eybee/heatmap
- Stage_ros
- amcl
- 2017/5/25
Calling the coverage planning path function from "Heatmap" c++ class in python, we need produce py file for c++ class through SWIG tools. It can transfer the .h file where a class is defined to .py file with .so file. In python we can import this .py file and use its member function .- SWIG
如何实现 C/C++ 与 Python 的通信?
-
swig -c++ -python great_class.i -
g++ -fPIC -shared great_class_wrap.cxx -o _great_class.so -I/usr/include/python2.7/ -lpython2.7>>> import great_class >>> c = great_class.Great() >>> c.setWall(5) >>> c.getWall()
-
- SWIG
ROS-learning-Unknown
最新推荐文章于 2023-04-15 18:55:26 发布
本文介绍了如何使用SWIG工具实现C++与Python之间的代码交互。通过具体的步骤演示了从C++类到Python模块的整个过程,包括创建SWIG接口文件、编译生成共享库以及在Python中调用C++类的方法。
3209

被折叠的 条评论
为什么被折叠?



