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 Xtionprolive rgbd sensor..The output is converted to laser scan using depthscantolaserscan. Then the laser scan output is provided to slamgmapping node. While launching, the slamgmapping 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 urdfspawner completes it work and finishes cleanly, slamgmapping node dies with exitcode 11. slamgmapping 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 robotdescriptionurdf 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] [1539319422.546206807, 10.118000000]: publishing default camera info, then openni kinect camera info
[DEBUG] [1539319422.771212911, 10.286000000]: publishing default camera info, then openni kinect camera info
[DEBUG] [1539319422.780569965, 10.295000000]: publishing default camera info, then openni kinect camera info
[DEBUG] [1539319422.986164049, 10.475000000]: publishing default camera info, then openni kinect camera info
[DEBUG] [1539319422.990881384, 10.480000000]: publishing default camera info, then openni kinect camera info
[slam_gmapping-9] process has died [pid 28493, exit code -11, cmd /opt/ros/kinetic/lib/gmapping/slam_gmapping odom:=odom __name:=slam_gmapping __log:=/home/ann/.ros/log/5c94701c-cdd9-11e8-84e2-74dfbff0f0c0/slam_gmapping-9.log].
log file: /home/ann/.ros/log/5c94701c-cdd9-11e8-84e2-74dfbff0f0c0/slam_gmapping-9*.log
[DEBUG] [1539319423.140172052, 10.616000000]: publishing default camera info, then openni kinect camera info
[DEBUG] [1539319423.141716943, 10.618000000]: publishing default camera info, then openni kinect camera info
[DEBUG] [1539319423.308988157, 10.784000000]: publishing default camera info, then openni kinect camera info
Asked by AV on 2018-10-11 00:05:12 UTC
Comments
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)
Asked by Delb on 2018-10-11 01:36:50 UTC
I have included my launch file. not able to include tftree and rqt_graph since i dont have enough votes
Asked by AV on 2018-10-11 02:10:31 UTC
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.Asked by Delb on 2018-10-11 02:51:47 UTC
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
Asked by AV on 2018-10-11 03:08:23 UTC
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" />
.Asked by Delb on 2018-10-11 03:28:49 UTC
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/235458/what-is-tf_static/)
Asked by AV on 2018-10-11 04:05:39 UTC
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
Asked by AV on 2018-10-11 04:06:58 UTC
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)Asked by Delb on 2018-10-11 04:23:45 UTC
I just modified as you suggested.. please bear with me since i am new to ROS. i have edited my question with the launch file and output. Same results ..no change..In rviz the map is showing as no map received.
Asked by AV on 2018-10-11 05:00:40 UTC
Your full launch file might be more relevant since it seems there is something going on with the
openni_camera
(I assume you're are using it, right ?)Asked by Delb on 2018-10-11 07:34:01 UTC
thanks a lot again. i have updated my full launch file..Now after the slam_gmapping node dies the output console messages stops. i am using openni_camera
Asked by AV on 2018-10-11 23:22:46 UTC