Build a map and set a nav goal with gmapping and Husky A200

asked 2016-08-25 03:45:37 -0500

Marcus Barnet gravatar image

updated 2016-08-25 03:46:25 -0500

I'm able to build a 2D map with gmapping by using a SICK laser and IMU. I use robot_localization to obtain /odometry/filtered by using wheel encoders and IMU (when I lunch my robot roslaunch husky_base base.launch, base.launch launches control.launch which launches robot_localization package).

By giving these commands:

roscore
rosparam set use_sim_time true
roslaunch husky_viz view_robot.launch
roslaunch husky_navigation gmapping_demo.launch 
rosbag play --clock file.bag

I can see a map like this: image description

(Right click on it and then "view" to see it larger)

Please see also the errors on the left side (I think they are not so important since I'm able to build the map).

The problem now is that I'm not able to set the navigation goal and make the robot navigate towards it. When I launch husky_navigation gmapping_demo.launch, it also launches move_base but I can't understand why the robot don't move.

This is gmapping_demo.launch:

<launch>

  <!--- Run gmapping -->
  <include file="$(find husky_navigation)/launch/gmapping.launch" />

  <!--- Run Move Base -->
  <include file="$(find husky_navigation)/launch/move_base.launch" />

</launch>

and this is the move_base.launch file:

<launch>

  <arg name="no_static_map" default="false"/>

  <arg name="base_global_planner" default="navfn/NavfnROS"/>
  <arg name="base_local_planner" default="dwa_local_planner/DWAPlannerROS"/>
  <!-- <arg name="base_local_planner" default="base_local_planner/TrajectoryPlannerROS"/> -->

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">

    <param name="base_global_planner" value="$(arg base_global_planner)"/>
    <param name="base_local_planner" value="$(arg base_local_planner)"/>  
    <rosparam file="$(find husky_navigation)/config/planner.yaml" command="load"/>

    <!-- observation sources located in costmap_common.yaml -->
    <rosparam file="$(find husky_navigation)/config/costmap_common.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find husky_navigation)/config/costmap_common.yaml" command="load" ns="local_costmap" />

    <!-- local costmap, needs size -->
    <rosparam file="$(find husky_navigation)/config/costmap_local.yaml" command="load" ns="local_costmap" />
    <param name="local_costmap/width" value="10.0"/>
    <param name="local_costmap/height" value="10.0"/>

    <!-- static global costmap, static map provides size -->
    <rosparam file="$(find husky_navigation)/config/costmap_global_static.yaml" command="load" ns="global_costmap" unless="$(arg no_static_map)"/>

    <!-- global costmap with laser, for odom_navigation_demo -->
    <rosparam file="$(find husky_navigation)/config/costmap_global_laser.yaml" command="load" ns="global_costmap" if="$(arg no_static_map)"/>
    <param name="global_costmap/width" value="100.0" if="$(arg no_static_map)"/>
    <param name="global_costmap/height" value="100.0" if="$(arg no_static_map)"/>
  </node>

</launch>

Moreover: what is the meaning of the colored areas? (blue, sky blue and yellow?)

edit retag flag offensive close merge delete

Comments

Did you ever fix this issue? I have this problem currently

distro gravatar image distro  ( 2022-08-16 18:33:33 -0500 )edit