gmapping with navigation
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 ...