ubuntu系统下打开kinetic相机+结合上篇文章yolo

上篇文章我们实现了yolo下与本机电脑摄像头结合的物体识别;

本节我们想办法打开kinetic相机:

1.  安装我们需要的驱动:

sudo apt-get install  ros-kinetic-freenect-*
rospack profile

2. 检查turtlebot默认的3D传感器的环境变量和确定输出

echo $TURTLEBOT_3D_SENSOR

3. 如果你看到一个3D传感器,例如asus_xtion_pro,您将需要设置环境变量的默认值,修改和重新启动终端:

echo "export TURTLEBOT_3D_SENSOR=kinect" >> .bashrc

4. 接下来我们启动相机:

roslaunch turtlebot_bringup minimal.launch

roslaunch freenect_launch freenect-registered-xyzrgb.launch

rosrun image_view image_view image:=/camera/rgb/image_color

5. 更改yolo配置文件(更改位置和上篇文章提到的一样):

subscribers:

  camera_reading:
    topic: /camera/rgb/image_rect_color
    queue_size: 1

actions:

  camera_reading:
    name: /darknet_ros/check_for_objects

publishers:

  object_detector:
    topic: /darknet_ros/found_object
    queue_size: 1
    latch: false

  bounding_boxes:
    topic: /darknet_ros/bounding_boxes
    queue_size: 1
    latch: false

  detection_image:
    topic: /darknet_ros/detection_image
    queue_size: 1
    latch: true

image_view:

  enable_opencv: true
  wait_key_delay: 1
  enable_console_output: true

 

你可能感兴趣的:(物体识别)