Robotics StackExchange | Archived questions

Gmapping not working, errors with gmapping services.

Hello all, I am a new guy to ROS(Indigo) and dealing with a robot and SLAM which will use gmapping. However I got some error when launch the nodes (errors from roswtf):

Found 3 error(s).

ERROR Could not contact the following nodes: * /slam_gmapping

ERROR The following nodes should be connected but aren't: * /slamgmapping->/rviz (/tf) * /slamgmapping->/rviz (/map) * /r2000node->/slamgmapping (/r2000node/scan) * /mapnavbroadcasterpepperl->/slamgmapping (/tf) * /qfeelserial->/slamgmapping (/tf) * /slamgmapping->/slam_gmapping (/tf)

ERROR Errors connecting to the following services: * service [/slamgmapping/getloggers] appears to be malfunctioning: Unable to communicate with service [/slamgmapping/getloggers], address [rosrpc://jtian-Latitude-E6520:33331] * service [/slamgmapping/setloggerlevel] appears to be malfunctioning: Unable to communicate with service [/slamgmapping/setloggerlevel], address [rosrpc://jtian-Latitude-E6520:33331] * service [/dynamicmap] appears to be malfunctioning: Unable to communicate with service [/dynamicmap], address [rosrpc://jtian-Latitude-E6520:33331]

This is my gmapping.launch file:

<?xml version="1.0"?>
<launch>

    <include file="$(find pepperl_fuchs_r2000)/launch/r2000.launch"> 
      <arg name="frame_id" value="/scan"/>
      <arg name="scanner_ip" value="192.168.1.62"/>
      <arg name="scan_frequency" value="35"/>
      <arg name="samples_per_scan" value="3600"/>
    </include>

    <include file="$(find ybot)/launch/ybot.launch"/>
    <node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster_pepperl" args="0.20 0 0.2 0 0 0  base_link scan 100" />

    <include file="$(find ybot)/launch/includes/gmapping.launch.xml">
    </include>

    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find ybot)/param/navigation.rviz"/>

</launch>

And the gmapping.launch.xml:

<launch>
<!-- http://wiki.ros.org/gmapping -->
  <arg name="scan_topic" default="/r2000_node/scan" />

  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="base_frame" value="base_link"/>
    <param name="odom_frame" value="odom"/>
    <param name="map_update_interval" value="5.0"/>
    <param name="maxUrange" value="6.0"/>
    <param name="maxRange" value="8.0"/>
    <param name="sigma" value="0.05"/>
    <param name="kernelSize" value="1"/>
    <param name="lstep" value="0.05"/>
    <param name="astep" value="0.05"/>
    <param name="iterations" value="5"/>
    <param name="lsigma" value="0.075"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="0"/>
    <param name="srr" value="0.01"/>
    <param name="srt" value="0.02"/>
    <param name="str" value="0.01"/>
    <param name="stt" value="0.02"/>
    <param name="linearUpdate" value="0.5"/>
    <param name="angularUpdate" value="0.436"/>
    <param name="temporalUpdate" value="-1.0"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="80"/>

    <param name="xmin" value="-50.0"/>
    <param name="ymin" value="-50.0"/>
    <param name="xmax" value="50.0"/>
    <param name="ymax" value="50.0"/>

    <!-- Increase resolution -->
    <param name="delta" value="0.01"/>
    <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="/r2000_node/scan"/>
  </node>
</launch>

It seems there're some issue with the gmapping services. I intstalled the gmapping package via command

apt-get install ros-indigo-slam-gmapping

However after the installation is done, I can't find the package by

rospack find ros-indigo-slam-gmapping

It will prompt a message which saying : [rospack] Error: package 'ros-indigo-slam-gmapping' not found I suspect if the installation of gmapping package was brocken, I re-install it for a couple times, but it didn't work all the same.

btw. I am using a pepperl_fuchs r2000 laser scaner on the robot. Am I missing something here ??

Thanks for your help

Asked by EverestT on 2017-06-14 13:46:21 UTC

Comments

Answers

Hi there, rospack tool uses the "ROS package name" to look for packages not the "Debian package name" (it is confusing, I know).

ros-indigo-slam-gmapping is the name of a debian package that contains the ROS packages gmapping and openslam_gmapping

So the correct way to check if the gmapping is present would be: rospack find gmapping

I assume that you are using Ubuntu 14.04, is that correct? Could you attach the console output when you execute your launch file?

Asked by Martin Peris on 2017-06-14 18:40:10 UTC

Comments