GMapping and Laser_scan_matcher stopped working.

asked 2018-04-20 04:16:29 -0500

LeoFSto gravatar image

updated 2018-04-23 09:25:05 -0500

Hey there,

I'm working on a robot to create maps via "Gmapping" and" Laser_scan_matcher" with a "sick tim 571", used with the "sick_tim" package, on a robot plattform. I use ROS kinetic on an Ubuntu 16.0.4 laptop and Ubuntu mate on an raspberry pi 3. For showing my trajectory I use the "hector_trajectory_server" from the "hector_slam" package. Im fairly new to ros, so maybe I miss the obvious. I had a working build, which happens to just stop working. Sounds crazy but I have a backup of the working files.

The raspberry pi is the master and runs the sick_tim node. All the other stuff gets processed on my laptop (LENOVO V110)

So after doing some other stuff around the controls for driving the robot I revisited my SLAM files. I tried running the SLAM while my car drives "autonomously". Since then the SLAM doesn't work anymore.

I also use Hector_slam for mapping purposes and it still works like a charm. Just the trajectory created from hector_trajectory_server does not work anymore. (Worked last week, stopped working when GMapping stoppend working)

I don't no if it is relevant but the node controlling the robot were written in python and subscribed to the "/scan" topic to detect walls. It also is connected to an TREX Motor Controller via I2C-Bus.

The Laser_scan_matcher still creates the correct pose but gmapping does not use it correctly. So somehow the "fixed frame" from laser_scan_matcher and the "odom_frame" from GMapping seem to stop working together.

I already tried to use the tutorial from laser_scan_matcher and looked through everything google has to offer for that topic but can't get it to run properly.

There has to be something fishy about all that because at the time of the files below working I had to call laser_scan_matcher, gmapping and rviz in this direct order or I would not get anything in rviz.

I used the following launch files. I know there is lots of stuff which does not do anything or is unnecessary but I thought it would be best to give you the raw, original material. For example I used to have an imu (mpu6050) but the i2c did not work while my motorcontroller was in use. The both launch files look like this:

<?xml version="1.0"?>
<launch>
  <node name="sick_tim571_2050101" pkg="sick_tim" type="sick_tim551_2050001" respawn="false" output="screen">
    <param name="frame_id" type="str" value="laser" />
    <param name="range_max" type="double" value="25.0" />
    <!--<param name="skip" type="int" value="9" />-->
  </node>
</launch>


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

    <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen"> 
    <param name="throttle_scans" value="5"/>
    <param name="base_frame" value="scan"/>
    <param name="map_frame" value="map"/>
    <param name="odom_frame" value="scan"/>
    <param name="map_update_interval" value="0.5"/>
    <param name="maxUrange" value="20.0"/>
    <param name="sigma" value="0.05"/>
    <param name="kernelSize" value="3"/>
    <param name="lstep" value="0.05"/>
    <param name="astep" value="0.05"/>
    <param name="iterations" value="5"/>
    <param name="lsigma" value ...
(more)
edit retag flag offensive close merge delete