导航

    蓝鲸ROS机器人论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 热门
    ROS交流群
    ROS Group
    产品服务
    Product Service
    开源代码库
    Github
    官网
    Official website
    技术交流
    Technological exchanges
    激光雷达
    LIDAR
    ROS教程
    ROS Tourials
    深度学习
    Deep Learning
    机器视觉
    Computer Vision

    xiaoqiang tutorial (10) use kinect for autonomous mobile and obstacle avoidance

    产品服务
    1
    1
    1781
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • weijiz
      weijiz 最后由 weijiz 编辑

      Xiaoqiang Homepage

      Click to watch the demo video

      principle:

      The freenct_stack package provides a kinect driver, and its published point cloud is transformed into an obstacle grid distribution image by image_pipeline. After the nav_test software package starts the navigation program, it analyzes the obstacle distribution map automatically, and then moves autonomously according to the target navigation point published by the rviz.

      Steps:

      1. Configure the hosts file of the host and the local virtual machine so that the two computer can access the corresponding ros data.

      1.a Configure the local virtual machine

      sudo gedit /etc/hosts
      

      Replace the ip address in the figure below with the actual value of the platform

      0_1536821744437_ff847a2d-1bf4-45c4-b672-46338d05808c-image.png

      1.b Configuration Xiaoqiang Host

      LAN ssh login Xiaoqiang host

      ssh xiaoqiang@192.168.0.101 -X
      sudo gedit /etc/hosts
      

      Replace the ip address in the following figure with the actual value of the virtual machine and change the host name to the virtual machine name

      0_1536821792571_bfc4e11d-f049-4c14-8f5d-17ef104e6980-image.png

      2. Open three windows in the local virtual machine, respectively ssh login Xiaoqiang host, start the relevant software package mentioned in the principle section

      2.a Ssh login

      0_1536821820312_a1efd39d-0a74-4287-8f26-d320aa50a76e-image.png

      2.b Start the kinect driver in the first window

      For kinect v1

      roslaunch freenect_launch kinect-xyz.launch
      

      For Kinect v2

      roslaunch kinect2_bridge kinect2-xyz.launch
      

      For astrapro

      roslaunch astra_launch astrapro.launch
      

      2.c Set kinect angle in the second window, this angle is not arbitrary

      For kinect v1

      rostopic pub /set_tilt_degree std_msgs/Int16 '{data: -19}' -1
      

      For Kinect v2

      Since the kinect v2 does not have a pitch angle motor, manually adjust the kinect v2 to the maximum depression angle

      For astrapro

      Since the astrapro does not have a pitch angle motor, manually adjust the astrapro to the maximum depression angle.

      2.d Edit the platform navigator configuration file /home/xiaoqiang/Documents/ros/src/nav_test/config/fake/base_local_planner_params2.yaml to enable kinect

      0_1536822064424_e1075027-0199-4e0c-8447-5feb0471cf47-image.png

      2.e Launch the platform navigation program in the third window

      roslaunch nav_test fake_move_base_blank_map.launch
      

      2.f If all normal, there will be an interface similar to the following figure. All configurations on xiaoqiang have completed.

      0_1536822110307_8b4b566a-9ca8-4ed1-a027-1507e5f5e149-image.png

      3.Open a new window in the local virtual machine and start rviz

      3.a After joining ros LAN, open rviz

      export ROS_MASTER_URI=http://xiaoqiang-desktop:11311
      rviz
      

      Note: If Xiaoqiang’s model cannot be displayed, Xiaoqiang model package should be installed locally.

      0_1536822189815_2cd6c0d0-24a7-49de-83c3-c4f55b55e4f8-image.png

      3.b Click open config in the upper left corner of the rviz interface and select the /home/xiaoqiang/Documents/ros/src/nav_test/config/nav_addwa_kinect.rviz configuration file on Xiaoqiang’s host.

      0_1536822213670_b07422df-9744-4e34-8871-24d464c10231-image.png

      3.c Normally, a picture similar to the one below will appear in rviz. Now that all configurations have been completed, the next step is to publish navigation targets.

      0_1536822244220_3e83b532-25d4-4207-b2a8-f09a1b57b5b3-image.png

      3.d Randomly publish a target point, Xiaoqiang will start autonomous movement

      0_1536824006028_a3fdb7cb-f1ae-47b1-9901-1f2d467ff280-image.png

      3.e Xiaoqiang reaches the target point, please continue to try other positions. This tutorial ended.

      0_1536824035150_69fc0931-fae1-41a2-ac37-fd8eaebbc020-image.png

      Please insert the kinect data cable into the blue host USB3.0 port of xiaoqiang to ensure the normal operation of the driver. Model 1473 kinect users please refer to the preparation method in tutorial (9).

      If xiaoqiang has been moving backwards, it can be seen in rviz that there is a black area in front of xiaoqiang, and the black area has been following Xiaoqiang’s movement. This situation indicates that the kinect installation or kienct angle is not in right. Please check the kinect mounting bracket, remove the kienct film and re-execute the instructions in the tutorial.

      FAQ

      Q: Map shows normally and the car can also be remote controlled, although published the target point vai rviz to the car , the car does not move to the target point.
      A: In general, this problem is a network setup problem. This tutorial requires the hosts record to be set up between the xiaoqiang and the local machine, and to be able to access each other directly. After setting up the IP record, you can ping each other on the xiaoqiang and local computer to check the network connection. For example type following cmd on local machine

      ping xiaoqiang-desktop
      

      Enter the following cmd on xiaoqiang

      ping ubuntu # Suppose your computer name is ubuntu
      

      If we cannot ping between the two successfully, then you need check your network settings.

      Xiaoqiang Homepage
      Back To Index

      1 条回复 最后回复 回复 引用 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2015-2023 BlueWhale community