Gmapping - does not draws obstacles.
Hello I am trying to create map of my gazebo world and visualize it on RViz. But gmapping (gmapping.launch) does not draws obstacles in my world. Any idea why?
--gmapping.launch--
<?xml version="1.0"?>
<launch>
<arg name="scan_topic" default="lidar" />
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping">
<rosparam>
odom_frame: odom_combined
base_frame: base_link
map_frame: map
map_update_interval: 0.20 # Publish new map
maxUrange: 4.5 # Should be just less than sensor range
maxRange: 5.0 # Should be just greater than sensor range
particles: 100 # Increased from 80
# Update frequencies
linearUpdate: 0.3
angularUpdate: 0.5
temporalUpdate: 2.0
resampleThreshold: 0.5
# Initial Map Size
xmin: -10.0
ymin: -10.0
xmax: 10.0
ymax: 10.0
delta: 0.10 # 0.05
# All default
sigma: 0.05
kernelSize: 1
lstep: 0.05
astep: 0.05
iterations: 10 # 5
lsigma: 0.075
ogain: 3.0
lskip: 0
llsamplerange: 0.01
llsamplestep: 0.01
lasamplerange: 0.005
lasamplestep: 0.005
</rosparam>
<remap from="scan" to="$(arg scan_topic)"/>
</node>
</launch>
--rosnode info--
metobom@metobom-TULPAR-T5-V17-1:~$ rosnode info /slam_gmapping
--------------------------------------------------------------------------------
Node [/slam_gmapping]
Publications:
* /map [nav_msgs/OccupancyGrid]
* /map_metadata [nav_msgs/MapMetaData]
* /rosout [rosgraph_msgs/Log]
* /slam_gmapping/entropy [std_msgs/Float64]
* /tf [tf2_msgs/TFMessage]
Subscriptions:
* /clock [rosgraph_msgs/Clock]
* /lidar [sensor_msgs/LaserScan]
* /tf [tf2_msgs/TFMessage]
* /tf_static [tf2_msgs/TFMessage]
Services:
* /dynamic_map
* /slam_gmapping/get_loggers
* /slam_gmapping/set_logger_level
contacting node http://metobom-TULPAR-T5-V17-1:44425/ ...
Pid: 3216
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /tf
* to: /slam_gmapping
* direction: outbound
* transport: INTRAPROCESS
* topic: /tf
* to: /rviz_1551168483948813089
* direction: outbound
* transport: TCPROS
* topic: /clock
* to: /gazebo (http://metobom-TULPAR-T5-V17-1:35219/)
* direction: inbound
* transport: TCPROS
* topic: /tf
* to: /slam_gmapping (http://metobom-TULPAR-T5-V17-1:44425/)
* direction: inbound
* transport: INTRAPROCESS
* topic: /tf
* to: /robot_state_publisher (http://metobom-TULPAR-T5-V17-1:38207/)
* direction: inbound
* transport: TCPROS
* topic: /tf
* to: /gazebo (http://metobom-TULPAR-T5-V17-1:35219/)
* direction: inbound
* transport: TCPROS
* topic: /tf_static
* to: /robot_state_publisher (http://metobom-TULPAR-T5-V17-1:38207/)
* direction: inbound
* transport: TCPROS
* topic: /lidar
* to: /gazebo (http://metobom-TULPAR-T5-V17-1:35219/)
* direction: inbound
* transport: TCPROS
my tf tree
Do you mean you see no map at all in RVIZ or that the map you see doesn't include obstacles within the map? Which map topic is RVIZ displaying? Can you try to include the image again?
also please post the output of
rosnode info /slam_gmapping
when the error occurs.@billy Yes exactly. There is a map but there are no obstacles, only an empty map. Topic name is "/map". @mgruhler I added the output you wanted to my question. Also there are no errors.
@metobom you seem to haven't saved :-)
If there is actually nothing in it, there are most probably two possible issues: No updates due to missing odometry information or no received laserscans. please again update :-) and also add the configuration of your gmapping launch file.
I've edited again :). @mgruhler
only from looking at your configuration, I don't see anything wrong. The remapping is there,
gmapping
subscribes to the LiDAR. You have temporal update activated, i.e. you should be getting updates even when there is no odometry update triggered... Aside from no valid data (i.e. ranges < 4.5m)...or no odometry information at all (maybe share your tf tree?) I'm at a loss to what could be the problem.
Thank you for your interest @mgruhler. I added a part of my tf tree to my question.