2019年7月9日14:31:13

完成了一个简单的小例子,python生成点云数据,利用pybind11传给PCL显示。

ubuntu 16.04 + Anaconda3  python3.6 + PCL 1.8 + pybind11 

代码: https://github.com/necroen/py_pcd_visualization

效果图如下:

python利用pybind11调用PCL点云库

搞深度估计,一直需要点云库PCL的python接口,未来还需要用到PCL中的某些功能。

然而好像没有什么资料和例子。

github上也只有一个看起来不怎么完善的库:  https://github.com/strawlab/python-pcl

看起来就不太好编译,没玩过。然后想着自己用pybind11封装需要的功能。

 

用的是高博slam14讲代码里ch5 joinMap的数据:

https://github.com/gaoxiang12/slambook/tree/master/ch5/joinMap

 

基本上就是把pybind11的例子和PCL的例子揉合到一块

pybind11的例子:

https://github.com/tdegeus/pybind11_examples

https://www.jianshu.com/p/c912a0a59af9

PCL的例子:

https://blog.csdn.net/fsencen/article/details/79386570 

 

注意点:

1,pybind11的python编译器要指定

2,pybind11文件夹放在cpp文件同级目录

3,pybind11中target_library的用法

 

其实我之前折腾了好几天试图把ros的package用pybind11封装成库给python

用,没成功,如果这个弄出来会更省事,然而ros包的编译过程改不动。。。

 

相关文章:

  • 2021-09-04
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2021-04-24
  • 2021-07-22
  • 2021-09-11
  • 2021-07-14
猜你喜欢
  • 2021-12-11
  • 2021-08-18
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案