Jetpack上装的opencv,有cuda,但是不全,没有cv::cuda::imgproc,cv::cuda::warp等。
所以卸载了再装完整版opencv3.3或者别的
卸载
sudo apt purge libopencv*
安装
github上的nano_build_opencv 脚本运行,选择版本即可
查看板本
opencv_version
ros用catkin_make编译的时候,找不到OpenCVConfig.cmake,用set opencv dir 命令,地址藏在/usr/local/lib/cmake/opencv4/opencv2里面,下次找不到用find /usr/local -name "*name*" 命令
然后cv_bridge是ros下的一个包,再/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake 里面修改set(_include_dirs ) 里面的内容,改到opencv4,具体见git上ros-perception/vision_opencv/issues/345
gtm没改全,
参照
解决Ubuntu环境下ROS Kinetic中的cv_bridge和自己安装OpenCV 2.4.xx兼容性笔记blog.csdn.net然后cmakelist里的链接库,set opencv_dl 写opencv.o,.so这些库的位置,我是在usr/share文件夹里,书记实在usr/include/lib文件夹里
最后cv::windowsize找不到的话,头文件加一个就行了
cv::cuda::imgproc可以加速,例程里houghlines是虚函数,使用方法参考hands on gpu accelerate computer vision with OpenCV的git书上第8章
编译通过,运行时提示throw no cuda怎么办?
Having trouble using CUDA enabled OpenCV with kinetic
bianyi, chu xian pcl cluster wenti
field ‘param_k_’ has incomplete type ‘flann::SearchParams’
https://github.com/strands-project/strands_3d_mapping/issues/67#issuecomment-271258586github.com/usr/include/pcl-1.8/pcl/kdtree/kdtree_flann.h
line 231 ::flann::SearchParams param_k_;
::flann::SearchParams *param_k_;
line 233 ::flann::SearchParams param_radius_;
::flann::SearchParams *param_radius_;
和stm32通过ch340通信时,先确保驱动一致,不然读取位数不对,然后用serial.write发的会发ascii码,用char(i%256)和char(i/256)作为高低八位的字符串输出位,就可以输出十六进制数了,读取同理,结果用int()强制转换,获得read到的字符串对应的十进制数
自启动设置:
/etc/udev下面先创建一个rules.文件,ls usb找到口子的硬件地址,把tty口和video口和别名绑定上
然后安装sudo apt install ros-melodic-robot-upstart
rosrun robot_upstart install serialport/launch/test.launch
如卸载跑rosrun robot_upstart unsinstall serialport
运行sudo systemctl start serialport
查看sudo systemctl status serialport
关闭sudo systemctl stop serialport
如需修改launch文件,可在/etc/ros文件夹里修改
upstart方法不行,应该新建一个.sh文件
#! /bin/bash
source /opt/ros/melodic/setup.bash
source /home/nano/catkin_ws/devel/setup.bash
roslaunch serialport auto_car.launch
exit 0
然后
gnome-session-properties添加
ROS:开机自启动_importSUC的专栏-CSDN博客
cv_camera包不好用,没法mjpeg,yuyv影响帧率,该相机只支持到5帧