Ros图像处理(一)
参考自链接
3、在导入包时出现Illegal instruction (core dumped)该错误

解决方法:
运行前export OPENBLAS_CORETYPE=ARMV8
可加入到~/.bashrc中
4、在Jetson Nano上安装各种包
链接
1、cv_bridge和opencv版本不匹配报错的问题
File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2
from cv_bridge.boost.cv_bridge_boost import getCvType
ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)
按照catkin_make的方式重新安装
sudo apt install python-catkin-tools python3-dev python3-catkin-pkg-modules python3-numpy python3-yaml ros-melodic-cv-bridge
mkdir -p cv_bridge_ws/src && cd cv_bridge_ws
git clone https://github.com/ros-perception/vision_opencv.git src/vision_opencv
apt-cache show ros-melodic-cv-bridge | grep Version
cd src/vision_opencv/
git checkout 1.13.1
cd ../../
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so
source devel/setup.bash --extend
cd ../catkin_ws
catkin_make
source devel/setup.bash
此时可以重启realsense的launch文件,如有包丢失,则重新下载安装。
2、切换python版本问题
update-alternatives --display python
出现如下错误:
update-alternatives: 错误: 无 python 的候选项
添加,
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2 # 添加Python2可选项,优先级为2,优先级高的数字大,此处设置python2优先级高于python3
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1 #添加Python3可选项,优先级为1
此时python版本配置为python2.7,可使用以下命令进行查询:
python --version
打开配置选项,
sudo update-alternatives --config python

选择后回车。