realsense t265测试中出现的一些小问题
环境:Ubuntu18.04
内核:5.4
官方教程:https://github.com/IntelRealSense/realsense-ros/
测试过程是根据官方教程走的,中间会出现一些小问题,在这里记录。
step1:安装realsense sdk,推荐用debian软件包安装,跟教程就可以
step2:安装realsense-ros,在官方教程页面里有。
在这一步中运行catkin_make相关命令时,会出现
CMake Error at realsense-ros/realsense2_camera/CMakeLists.txt:48 (message):
Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases
这样一个错误,有两个可能的原因,一个是cmakelists文件中查找的sdk版本与系统安装的sdk版本不一致导致的,可以根据安装的sdk版本到cmakelists文件中修改;另一个原因可能时由于没有安装librealsense2,执行以下命令
sudo apt-get install librealsense2-dev
安装即可解决上述问题。
step3:运行rc_t265.launch文件测试相机
在这个过程中,会出现这样一个错误
[ERROR] [1621048523.167745870]: The requested device with device name containing t265 is NOT found. Will Try again.
应该是由于电脑没有识别到t265的端口,这是由于我在上一步安装librealsense2包的时候没有断开相机连接,断开重插相机后找到相机。但是在查看topic时,发现只有以下topic
king@KING-PC:~$ rostopic list
/camera/accel/imu_info
/camera/accel/sample
/camera/gyro/imu_info
/camera/gyro/sample
/camera/odom/sample
/camera/realsense2_camera_manager/bond
/camera/tracking_module/parameter_descriptions
/camera/tracking_module/parameter_updates
/diagnostics
/rosout
/rosout_agg
/tf
/tf_static
没有image相关的话题,通过查看launch文件,发现文件中enable_fisheye1和enable_fisheye2的值都是false,修改为true,然后重新编译包,再次运行该launch文件,通过查看topic
king@KING-PC:~$ rostopic list
/camera/accel/imu_info
/camera/accel/sample
/camera/fisheye1/camera_info
/camera/fisheye1/image_raw
/camera/fisheye1/image_raw/compressed
/camera/fisheye1/image_raw/compressed/parameter_descriptions
/camera/fisheye1/image_raw/compressed/parameter_updates
/camera/fisheye1/image_raw/compressedDepth
/camera/fisheye1/image_raw/compressedDepth/parameter_descriptions
/camera/fisheye1/image_raw/compressedDepth/parameter_updates
/camera/fisheye1/image_raw/theora
/camera/fisheye1/image_raw/theora/parameter_descriptions
/camera/fisheye1/image_raw/theora/parameter_updates
/camera/fisheye2/camera_info
/camera/fisheye2/image_raw
/camera/fisheye2/image_raw/compressed
/camera/fisheye2/image_raw/compressed/parameter_descriptions
/camera/fisheye2/image_raw/compressed/parameter_updates
/camera/fisheye2/image_raw/compressedDepth
/camera/fisheye2/image_raw/compressedDepth/parameter_descriptions
/camera/fisheye2/image_raw/compressedDepth/parameter_updates
/camera/fisheye2/image_raw/theora
/camera/fisheye2/image_raw/theora/parameter_descriptions
/camera/fisheye2/image_raw/theora/parameter_updates
/camera/gyro/imu_info
/camera/gyro/sample
/camera/odom/sample
/camera/realsense2_camera_manager/bond
/camera/tracking_module/parameter_descriptions
/camera/tracking_module/parameter_updates
/diagnostics
/rosout
/rosout_agg
/tf
/tf_static
可以看到关于图像和imu的topic都发布出来了。
测试结束。