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

Gmapping - does not draws obstacles.

asked 2019-02-25 15:36:00 -0500

metobom gravatar image

updated 2019-02-27 01:42:34 -0500

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? image description

--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

image description

edit retag flag offensive close merge delete

Comments

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?

billy gravatar image billy  ( 2019-02-25 20:11:01 -0500 )edit

also please post the output of rosnode info /slam_gmapping when the error occurs.

mgruhler gravatar image mgruhler  ( 2019-02-26 01:02:24 -0500 )edit

@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 gravatar image metobom  ( 2019-02-26 01:35:18 -0500 )edit

@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.

mgruhler gravatar image mgruhler  ( 2019-02-26 01:51:43 -0500 )edit

I've edited again :). @mgruhler

metobom gravatar image metobom  ( 2019-02-26 02:11:26 -0500 )edit

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)...

mgruhler gravatar image mgruhler  ( 2019-02-27 00:56:53 -0500 )edit

or no odometry information at all (maybe share your tf tree?) I'm at a loss to what could be the problem.

mgruhler gravatar image mgruhler  ( 2019-02-27 00:57:33 -0500 )edit

Thank you for your interest @mgruhler. I added a part of my tf tree to my question.

metobom gravatar image metobom  ( 2019-02-27 01:42:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-12 17:17:10 -0500

metobom gravatar image

Here is the source and reason of problem LINK.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-02-25 15:36:00 -0500

Seen: 346 times

Last updated: Mar 12 '19