Robotics StackExchange | Archived questions

GMapping and Laser_scan_matcher stopped working.

Hey there,

I'm working on a robot to create maps via "Gmapping" and" Laserscanmatcher" with a "sick tim 571", used with the "sicktim" 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 "hectortrajectoryserver" from the "hectorslam" 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 Hectorslam for mapping purposes and it still works like a charm. Just the trajectory created from hectortrajectory_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 Laserscanmatcher still creates the correct pose but gmapping does not use it correctly. So somehow the "fixed frame" from laserscanmatcher and the "odom_frame" from GMapping seem to stop working together.

I already tried to use the tutorial from laserscanmatcher 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 laserscanmatcher, 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="0.075"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="10"/>
    <param name="srr" value="0.1"/>
    <param name="srt" value="0.2"/>
    <param name="str" value="0.1"/>
    <param name="stt" value="0.2"/>
    <param name="linearUpdate" value="0.10"/>
    <param name="angularUpdate" value="0.1"/>
    <param name="temporalUpdate" value="1.0"/>
    <param name="resampleThreshold" value="0.1"/>
    <param name="particles" value="15"/>
    <param name="xmin" value="-50.0"/>
    <param name="ymin" value="-50.0"/>
    <param name="xmax" value="50.0"/>
    <param name="ymax" value="50.0"/>
    <param name="delta" value="0.05"/>
    <param name="llsamplerange" value="0.01"/>
    <param name="llsamplestep" value="0.01"/>
    <param name="lasamplerange" value="0.005"/>
    <param name="lasamplestep" value="0.005"/>
    </node>
<node pkg="tf" type="static_transform_publisher" name="base_scan_to_map"      args="0 0 0 0 0 0 /map /scan 100" />

<node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster"      args="0 0 0 0 0 0 /scan /laser 100" />  
<node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
<remap from="map" to="/dynamic_map" />
<param name="map_file_path" type="string" value="$(find hector_geotiff)/maps" />
<param name="map_file_base_name" type="string" value="hector_slam_map" />
<param name="geotiff_save_period" type="double" value="10" />
<param name="draw_background_checkerboard" type="bool" value="true" />
<param name="draw_free_space_grid" type="bool" value="true" />
</node>
<node pkg="hector_imu_tools" type="pose_and_orientation_to_imu_node" name="pose_and_orientation_to_imu_node" output="screen">
<!--<remap from="/imu_topic" to="/imu_quat" />-->
<remap from="/fused_imu" to="/imu_link" />
<remap from="/pose" to="/pose_stamped" />
<remap from="/state" to="/state_imu" />
</node>
<node pkg="tf" type="static_transform_publisher" name="slam_out_pose_to_map"      args="0 0 0 0 0 0 /slam_out_pose /map 100" />  
<node pkg="tf" type="static_transform_publisher" name="base_stabilized_to_map"      args="0 0 0 0 0 0 /imu_link /map 100" />
<node pkg="tf" type="static_transform_publisher" name="imu_topic_to_map"      args="0 0 0 0 0 0 /imu_topic /map 100" />  
<node pkg="tf" type="static_transform_publisher" name="base_link_to_map"      args="0 0 0 0 0 0 /base_link /map 100" />  
<node pkg="rviz" type="rviz" name="rviz"/>
<node pkg="laser_scan_matcher" type="laser_scan_matcher_node" 
    name="laser_scan_matcher_node" output="screen">

    <param name="fixed_frame" value = "map"/>
    <param name="base_frame" value = "laser"/>
    <param name="publish_pose_stamped" value="true"/>
    <param name="max_iterations" value="10"/>
</node>
<node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
<param name="target_frame_name" type="string" value="map" />
<param name="source_frame_name" type="string" value="pose_stamped" />
<param name="trajectory_update_rate" type="double" value="10" />
<param name="trajectory_publish_rate" type="double" value="0.1" />
</node>
</launch>

I hope somebody can maybe help me with all that stuff. I have an bagfile with the working SLAM creating a Map and Trajectory and all while being driven on my robot. I don't know how to add bagfiles to my post.

I appreciate your help and thanks in advance

Leo

Asked by LeoFSto on 2018-04-20 04:16:29 UTC

Comments

Answers