slam_gmapping not mapping
Hi, i am using Ubuntu 16.04 and ROS kinetic.. I am trying to simulate mapping of indoor areas.I created my urdf and spawned the model..I am using Xtion_pro_live rgbd sensor..The output is converted to laser scan using depthscan_to_laserscan. Then the laser scan output is provided to slam_gmapping node. While launching, the slam_gmapping node initializes but no map is being created..i can see my robot moving around in the area in rviz and the boundaries are visible..But no colour change of mapped areas can be seen Also no output for my /map topic as well..Actually as soon as the urdf_spawner completes it work and finishes cleanly, slam_gmapping node dies with exit_code 11. slam_gmapping node is initialized and i get the registering first scan output as well.But soon after that process dies.. how can i get the slam_gmapping to map the area. thanks in advance
Edit: my launch file: Command used is roslaunch robot_description_urdf gazebo_model.launch
<launch>
<!-- these are the arguments you can pass this launch file, for
example paused:=true -->
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<!-- We resume the logic in empty_world.launch -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
</include>
<!-- urdf xml robot description loaded on the Parameter Server-->
<param name="robot_description" textfile="$(find robot_description_urdf)/urdf/mapper.urdf" />
<!-- Run a python script to the send a service call to gazebo_ros to
spawn a URDF robot -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
respawn="false" output="screen"
args="-urdf -model mapper -param robot_description"/>
<node name="joint_state_publisher" pkg="joint_state_publisher"
type="joint_state_publisher" ></node>
<!-- start robot state publisher -->
<node pkg="robot_state_publisher" type="robot_state_publisher"
name="robot_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find robot_description_urdf)/urdf.rviz" required="true" />
<!--- Depth image to laser scan -->
<node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan" >
<!-- <param name="scan_height" value="3"/> -->
<remap from="image" to="/rgbd_camera/depth/image_raw"/>
<param name="output_frame_id" value="rgbd_camera_depth_frame" />
</node>
<!-- Mapping Node -->
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen" >
<remap from="odom" to="odom" />
</node>
</launch>
and the output console
[ INFO] [1539319422.402854271, 10.007000000]: Laser is mounted upwards.
-maxUrange 9.99 -maxUrange 9.99 -sigma 0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05
-srr 0.1 -srt 0.2 -str 0.1 -stt 0.2
-linearUpdate 1 -angularUpdate 0.5 -resampleThreshold 0.5
-xmin -100 -xmax 100 -ymin -100 -ymax 100 -delta 0.05 -particles 30
[ INFO] [1539319422.413630494, 10.017000000]: Initialization complete
update frame 0
update ld=0 ad=0
Laser Pose= 0.159964 0.049 0.0026536
m_count 0
Registering First Scan
[DEBUG] [1539319422.543062621, 10.117000000]: publishing default camera info, then openni kinect camera info
[DEBUG ...
Can you give us more informations to help you ? List the commands you run, the launch files you use, rqt_graph etc... (everything relevant of course)
I have included my launch file. not able to include tftree and rqt_graph since i dont have enough votes
Thanks, so you say the
slam_gmapping
node dies ? First make sure you have correct sensors informations (ie thedepth_scan
topic has correct data). Also are you sure your parameters are correct ? You have changed some of them maybe try with their default values first to see if it works.First of all thanks a lot for helping me out. as you suggested i tried with default parameters..no change in output..slam_gmapping dies after first scan. i have included my depth_scan output as well
You didn't tried with the default parameters since you have still
odom:=/tf_static
in the error message (you can just delete all the params tag and frommapping
anddepth
nodes). Also, what is thistf_static
? Try deleting this line please<remap from="odom" to="/tf_static" />
.Thanks again..I deleted all params and remaps from depth and mapping nodes. Now once the urdf is spawned the console hangs..no more output messages and no further processes like rviz, gazebo and all not launched.
tf_static: ( https://answers.ros.org/question/2354... )
As i understood remap is used for specifying the subscribed topics of the nodes. That is why i gave odom to tf_static. or shall i remap it to tf
You should at least keep
<remap from="image" to="/rgbd_camera/depth/image_raw"/>
if you don't publish on a topicimage
. Fortf static
since it's used to create aframe
andremap
is fortopics
you can't do that. You have to setodom
to yourodom
source (which isodom
by default)