ros+paddlepaddle一起使用出现的问题
问题1: MouduleNotFoundError: No module named ‘rosbag’
解决方法:在.bashrc中添加 setup.bash
#运行
gedit ~/.bashrc
#添加
source /opt/ros/kinetic/setup.bash
保存后退出,进入到paddle环境
conda activate paddle
#运行
source ~/.bashrc
问题2:dynamic module does not define module export function(PyInit_cv_bridge_boost)
解决方法:
重新编译cv_bridge
参考Anaconda虚拟环境中,让Python3使用ROS的cv_bridge
编译好后打开虚拟环境,进入catkin_workspace空间进行source。
conda activate paddle
cd /home/l/catkin_workspace/
source install/setup.bash --extend
cd -
问题3:SystemError: initialization of cv_bridge_boost raised unreported exception
解决方法:把刚才在.bashrc中添加的注释掉(。。。)
#source /opt/ros/kinetic/setup.bash
问题4:ImportError: libcv_bridge_bridge.so:cannot open shared object file: No such file or directory
解决方法:修改LD_LIBRARY_PATH
参考python import error: cannot open shared object file
执行
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ros/kinetic/lib