ROS 使用 奥比中光 astra_camera + ar_track_alvar

7640阅读 0评论2019-08-02 iibull
分类:其他平台

根据

主要有 两个 ROS pack



apt 没有 melodic 的版本, 所以尝试从源码安装一下。
根据
的 readme.md

1. sudo apt install ros-$ROS_DISTRO-rgbd-launch ros-$ROS_DISTRO-libuvc ros-$ROS_DISTRO-libuvc-camera ros-$ROS_DISTRO-libuvc-ros
2. ss; git clone
3. 编译 astra      sm --pkg=astra_camera
4. 
roscd astra_camera;  ./scripts/create_udev_rules

使用:
roslaunch astra_camera astra.launch
或者  roslaunch astra_camera stereo_s.launch

对应的topic

点击(此处)折叠或打开

  1. */image_raw: depth/rgb/ir raw images
  2. */image_rect_raw: images rectified by intrinsic/extrinsic parameters
  3. */camera_info: camera intrinsic/extrinsic parameters
  4. /camera/depth/points: point cloud without color information
  5. /camera/depth_registered/points: xyzrgb point cloud
常用的service

点击(此处)折叠或打开

  1. /camera/get_device_type: return a string containing astra device type
  2. /camera/get_ir_exposure: get exposure value of ir camera
  3. /camera/get_ir_gain: get gain value of ir camera
  4. /camera/get_serial: get serial number
  5. /camera/get_uvc_exposure: get exposure value of rgb camera
  6. /camera/get_uvc_gain: get gain value of rgb camera
  7. /camera/get_uvc_white_balance: get white balance value of rgb camera
  8. /camera/reset_ir_exposure: reset ir exposure to default value
  9. /camera/reset_ir_gain: reset ir gain to default value
  10. /camera/set_ir_exposure: set ir exposure to specific value
  11. /camera/set_ir_gain: set ir gain to specific value
  12. /camera/set_laser: turn on (true) or turn off (false) laser
  13. /camera/set_uvc_exposure: set uvc exposure. (set 0 indicating auto mode)
  14. /camera/set_uvc_gain: set uvc gain
  15. /camera/set_uvc_white_balance: set uvc white balance (set 0 indicating auto mode)
  16. /camera/set_ir_flood: turn on (true) or turn off (false) ir flood
范例

点击(此处)折叠或打开

  1. rosservice call /camera/get_ir_exposure 获取 IR 曝光
  2. rosservice call /camera/set_ir_exposure "{exposure: 50}"

  3. //开关 laser
  4. rosservice call /camera/set_laser "{enable: true}" #turn on
  5. rosservice call /camera/set_laser "{enable: false}" #turn off




上一篇:ROS入门学习五机器人感知
下一篇:ROS 实验 - 普通摄像头做 AR tag 跟踪