https://github.com/orbbec/ros_astra_camera 上有具体的安装流程
其中有两个话题和点云相关
/camera/depth/points
: point cloud without color information/camera/depth_registered/points
: xyzrgb point cloud (Currently, RGB-D regestration supports default resolution only)
但是直接在rviz上订阅/camera/depth_registered/points
话题会报错([ERROR] [1634610351.479666125]: Rectified topic ‘/camera/rgb/image_rect_color’ requested but camera publishing ‘/camera/rgb/camera_info’ is uncalibrated)分析是因为获取rgb相机的参数文件。
解决办法:
- 用ros标定彩色相机。
- 为了防止以后标定其他相机覆盖了camera.yaml文件以及好区分多相机使用,这里将camera.yaml重命名为astropro_rgb.yaml。(.yaml路径在~/.ros/camera_info)
- 修改launch中的astropro.launch。注释第81行,修改为:
<! -- <param name="camera_info_url" value=""/> -->
<param name="camera_info_url" value="file://${ROS_HOME}/camera_info/astropro_rgb.yaml"/>
- 如果需要硬件同步,修改astropro.launch 的
color_depth_synchronization
为true。
<arg name="color_depth_synchronization" default="true" />
至此rviz上就可以正常显示/camera/depth_registered/points
话题了。(注意Color Transformer要选RGB8才会显示彩色点云)