zoukankan      html  css  js  c++  java
  • 用地图和提示的导航和定位--15

    摘要: 原创博客:转载请表明出处:http://www.cnblogs.com/zxouxuewei/

    openni :http://blog.justsophie.com/installing-kinect-nite-drivers-on-ubuntu-14-04-and-ros-indigo/

     如果你没有硬件来构建地图使用你自己的机器人,你可以使用在 rbx1_nav/maps测试图。否则你需要创建了一个地图按照前面章节的说明,你任然可以在这里使用它。ROS使用提示包装定位机器人现有的地图内使用从机器人的激光或深度相机的当前扫描数据。让我们在arbotix模拟器尝试假定位。

    1.首先在rbx1_nav/launch目录下查看fake_amcl.launch文件内容:

    <launch>
    <param name="use_sim_time" value="false" />
    <!-- Set the name of the map yaml file: can be overridden on the command line-->
    <arg name="map" default="test_map.yaml" />
    <!-- Run the map server with the desired map -->
    <node name="map_server" pkg="map_server" type="map_server" args="$(find
    rbx1_nav)/maps/$(arg map)"/>
    <!-- The move_base node -->
    <include file="$(find rbx1_nav)/launch/fake_move_base.launch" />
    <!-- Run fake localization compatible with AMCL output -->
    <node pkg="fake_localization" type="fake_localization"
    name="fake_localization" output="screen" />
    <!-- For fake localization we need a static transforms between /odom and /map
    and /map and /world -->
    <node pkg="tf" type="static_transform_publisher" name="odom_map_broadcaster"
    args="0 0 0 0 0 0 /odom /map 100" />
    </launch>

    2.启动turtlebot机器人节点:

    roslaunch rbx1_bringup fake_turtlebot.launch

    3.然后启动加载地图的节点,使用测试的地图:

    roslaunch rbx1_nav fake_amcl.launch map:=test_map.yaml

    4.在rviz视图中查看机器人:

    rosrun rviz rviz -d `rospack find rbx1_nav`/amcl.rviz

    一个测试的地图和turtlebot机器人已经顺利加载好了。

    5.下面我们使用amcl使机器人进行导航。电机rviz视图中的2D nav  goal 然后再地图中选择你要让机器人到达的地点,点击鼠标。你就可以看到机器人在全局地图中进行移动和导航。

    6.查看使用的节点框图:

    rqt_graph 

  • 相关阅读:
    OnsenUI和AngularJS配合搭建混合应用基本步骤
    cordova plugin add cordova-plugin-dialogs cordova自定义插件
    Android题目
    Service服务
    SD卡 存储与读写
    Service服务生命流程 广播Broadcast
    Volley 网络请求 (常用)
    Jason 键值对 网络请求
    写文件
    aaa
  • 原文地址:https://www.cnblogs.com/zxouxuewei/p/5268537.html
Copyright © 2011-2022 走看看