ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

gmapping with navigation

asked 2015-03-19 10:36:18 -0500

sophye_turtlebot gravatar image

Hi, I am trying to do a project on SLAM Gmapping (turtlebot2,kobuki base,ros-hydro) and I'm really blocked I need your help; actually my task is to navigate the TurtleBot and avoid obstacles and at the same time make carthographie. I follow the tutorial of stack navigation and after I realized that in that case I should not work with AMCL and map_server. So as a first step I tried to build the map,at the beginning it worked but after it didn't, I didn't know the reason, I find in rviz message: No map received. here are the steps I did: roslaunch turtlebot_bringup minimal.launch rosrun tf (laser-->base_link) rosrun tf (odom-->base_link) roslaunch turtlebot_navigation gmapping_demo.launch

the launch file of gmapping_demo.launch :

**<launch> <include file="$(find turtlebot_bringup)/launch/3dsensor.launch"> <arg name="rgb_processing" value="false"/> <arg name="depth_registration" value="false"/> <arg name="depth_processing" value="false"/> <arg name="scan_topic" value="/scan"/> </include> <include file="$(find turtlebot_navigation)/launch/includes/gmapping.launch.xml"/> <include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml"/> </launch>

the xml file of gmapping:

<launch> <arg name="scan_topic" default="scan"/>

<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">

<param name="delta" value="0.05"/>
<param name="llsamplerange" value="0.01"/>
<param name="llsamplestep" value="0.01"/>
<param name="lasamplerange" value="0.005"/>
<param name="lasamplestep" value="0.005"/>
<remap from="scan" to="$(arg scan_topic)"/>

</node> </launch>

the xml file of move_base:

<launch> <include file="$(find turtlebot_navigation)/launch/includes/velocity_smoother.launch.xml"/> <include file="$(find turtlebot_navigation)/launch/includes/safety_controller.launch.xml"/>

<arg name="odom_topic" default="odom"/> <arg name="map_topic" default="/map"/> <arg name="scan_topic" default="/scan"/>

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

<rosparam file="$(find turtlebot_navigation)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find turtlebot_navigation)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find turtlebot_navigation)/param/local_costmap_params.yaml" command="load" />
<rosparam file="$(find turtlebot_navigation)/param/global_costmap_params.yaml" command="load" />
<rosparam file="$(find turtlebot_navigation)/param/base_local_planner_params.yaml" command="load" />
<rosparam file="$(find turtlebot_navigation)/param/move_base_params.yaml" command="load" />

<remap from="cmd_vel" to="navigation_velocity_smoother/raw_cmd_vel"/>
<remap from="odom" to="$(arg odom_topic)"/>

</node> </launch>

and the configuration of costmap parametrs:

costmap_common_parametrs.yaml:

obstacle_range: 2.5 raytrace_range: 3.0 robot_radius: 0.20 footprint: [[-0.16, -0.16], [-0.16, 0.16], [0.16, 0.16], [0.16, -0.16]] footprint_padding: 0.01 inflation_radius: 0.5 max_obstacle_height: 0.6 min_obstacle_height: 0.0 observation_sources: scan bump scan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true} bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}

local_costmap_param:

local_costmap: global_frame: /odom robot_base_frame: base_link update_frequency: 5.0 publish_frequency: 2.0 static_map: false rolling_window: true width: 6.0 height: 6.0 resolution: 0.05 global_costmap_param:

globasl_costmap: global_frame: /map robot_base_frame: base_link update_frequency: 5.0 static_map: true

base_local_planner_param:

controller_frequency: 3.0 recovery_behavior_enabled: true clearing_rotation_allowed: true

TrajectoryPlannerROS: max_vel_x: 0.3 min_vel_x: 0.1 max_vel_theta: 1.0 min_vel_theta: -1.0 min_in_place_vel_theta: 0.6 acc_lim_x: 0.5 acc_lim_theta: 1.0 yaw_goal_tolerance: 0.3 ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-03-20 19:10:12 -0500

updated 2015-03-24 13:29:52 -0500

It sounds like you and I are working on nearly the same project. I am using the Pioneer3-DX and Microsoft Kinect rather than TurtleBot with laser scanner. I'll post what I have and hopefully it will help.

I followed this tutorial: Navigation - Robot Setup I also followed the video in this tutorial to help me set up RViz so I can send navigation goals to the robot and visualize him moving to the goal while building the map.
And this tutorial to build a map: Gmapping - Building a map from logged data

It looks as if you are doing everything correctly, starting your robot launch files, then your move_base.launch file.

Again, I recommend taking a look at the Navigation - Robot Setup tutorial. It is very straightforward, and while it is not specific for the Turtlebot, it should work with any robot. The turtlebot packages should take care of odometry, sensor, and tf (unless you need to add sensors) information.

I am still playing with the parameters to tune his navigation better. Long process...

Here is my move_base.launch:

<launch>

  <!-- Start gmapping -->
    <node  pkg="gmapping" name="slam_gmapping" type="slam_gmapping" output="screen" />

  <!-- Start navigation -->
    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
        <rosparam command="load" file="$(find follow_me_2dnav)/launch/costmap_common_params_p3dx.yaml" ns="global_costmap" />
        <rosparam command="load" file="$(find follow_me_2dnav)/launch/costmap_common_params_p3dx.yaml" ns="local_costmap" />
        <rosparam command="load" file="$(find follow_me_2dnav)/launch/local_costmap_params.yaml" />
        <rosparam command="load" file="$(find follow_me_2dnav)/launch/global_costmap_params.yaml" />
        <rosparam command="load" file="$(find follow_me_2dnav)/launch/base_local_planner_params.yaml" />
    </node>
</launch>

costmap_common_params.yaml:

obstacle_range: 4.0
raytrace_range: 5.0
inflation_radius: 0.5

footprint: [ [x1, y1], [x2, y2], [x3, y3], [x4, y4] ]

transform_tolerance: 0.5
expected_update_rate: 60
map_type: costmap

observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: kinect_depth_frame, data_type: LaserScan, topic: scan, marking: true, clearing: true, expected_update_rate: 0.2}

global_costmap_params.yaml:

global_frame: /map
robot_base_frame: base_link
update_frequency: 2.0
publish_frequency: 10.0
static_map: true

local_costmap_params.yaml:

global_frame: /odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 10.0
static_map: false
rolling_window: true
width: 7.5
height: 7.5
resolution: 0.05

base_local_planner_params.yaml

TrajectoryPlannerROS:
  max_vel_x: 0.6
  min_vel_x: 0.1
  max_rotational_vel: 0.5
  min_in_place_rotational_vel: 0.3
  escape_vel: -0.2

  sim_time: 2.0
  path_distance_bias: 0.7
  goal_distance_bias: 0.5
  occdist_scale: 0.05
  meter_scoring: true

  acc_lim_th: 2.0
  acc_lim_x: 2.0
  acc_lim_y: 2.0

  yaw_goal_tolerance: 0.1
  xy_goal_tolerance: 0.25

  holonomic_robot: false
edit flag offensive delete link more

Comments

Try to use comments, rather than an answer, unless you have the real answer...

You can edit your question or add updates to it instead.

sealguy77 gravatar image sealguy77  ( 2015-03-21 09:28:26 -0500 )edit

I'm not sure exactly what you are looking for or the changes you made to gmapping_demo.launch. But you can find the files you need here.

sealguy77 gravatar image sealguy77  ( 2015-03-21 09:30:18 -0500 )edit

The parameter files are here.

The move_base.launch.xml and gmapping.launch.xml are here.

Hope that helps.

sealguy77 gravatar image sealguy77  ( 2015-03-21 09:35:50 -0500 )edit

thank you very much I checked the files you sent me they look like my files but I still had the same problem I'll explain better my problem

sophye_turtlebot gravatar image sophye_turtlebot  ( 2015-03-23 10:11:31 -0500 )edit

I want build a map exactly like this tutorial: http://wiki.ros.org/turtlebot_navigat... so I am writing:

sophye_turtlebot gravatar image sophye_turtlebot  ( 2015-03-23 10:12:38 -0500 )edit

roslaunch turtlebot_bringup minimal.launch roslaunch turtlebot_navigation gmapping_demo.launch roslaunch turtlebot_rviz_launchers view_navigation.launch

sophye_turtlebot gravatar image sophye_turtlebot  ( 2015-03-23 10:12:51 -0500 )edit

but what I did not understand when I "roslaunch turtlebot_navigation gmapping_demo.launch"

sophye_turtlebot gravatar image sophye_turtlebot  ( 2015-03-23 10:14:52 -0500 )edit

as if he wait for a map while I'll build a map!! and the rviz screnn shows a warning "no map received"

sophye_turtlebot gravatar image sophye_turtlebot  ( 2015-03-23 10:16:39 -0500 )edit
0

answered 2015-03-21 08:28:35 -0500

sophye_turtlebot gravatar image

thank you for your reply in fact, what I want now is how to "build a map" Take a look in this page: http://wiki.ros.org/turtlebot_navigat... At the beginning I did run this step, but apparently after I made some changes in the gmapping_demo.launch file and now I am unable to recover the original file. So, I would be grateful if you send to me the content of the original file (apparently in this file there is the gmapping and the move_base files with parameters of local_costmap ,global_costmap...).

Really i spent more than one month in this step, unable to advance ,although I have already done that before :( but because of the changes that I made ,it doesn't work :(

thank you very much

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-03-19 10:36:18 -0500

Seen: 2,451 times

Last updated: Mar 24 '15