Using SLAM Gmapping on Stage with Fuerte [closed]

asked 2013-08-29 18:52:44 -0600

Zayin gravatar image

updated 2014-01-28 17:17:47 -0600

ngrennan gravatar image

I am having trouble using Gmapping on Stage along with a very basic controller publishing on cmd_vel and reading from base_scan. Here is my launch file:

<launch>
  <master auto="start"/>
  <param name="/use_sim_time" value="true"/>

  <node pkg="stage" type="stageros" name="stage" args="/path/follower.world" respawn="false" output="screen">    
  </node>

  <node pkg="gmapping" type="slam_gmapping" name="gmapping" output="screen">
  <remap from="scan" to="base_scan" />    
  <param name="inverted_laser" value="false" />
  <param name="maxUrange" value="30.0" />
  <param name="particles" value="70" />
  <param name="delta" value="0.05" />
  <param name="xmin" value="-11.5" />
  <param name="xmax" value="11.5" />
  <param name="ymin" value="-12.5" />
  <param name="ymax" value="12.5" />
  <param name="angularUpdate" value="0.5" />
  <param name="linearUpdate" value="1.0" />
  <param name="map_update_interval" value="1.0" />
  <param name="resampleThreshold" value="0.3" />
  <param name="llsamplerange" value ="0.05" />
  <param name="llsamplestep" value ="0.05" />
  <param name="lasamplerange" value ="0.05" />
  <param name="lasamplestep" value ="0.05" />
  </node>

<node pkg="rl_lab_controllers" type="follower" respawn="false" name="follower" output="screen"

</launch>

However, this doesn't work; I receive the error "transform from base_link to odom failed", then slam starts relying on the odometer so the map is all messed up. I don't understand why this is happening. Stage seems to be publishing the right tf's; the tree is as follows: map -> odom -> base_footprint -> base_link -> base_laser_link. Here is the tf tree created by view_frame:

image description

Oh, and I just noticed this on Rviz: image description However, I just reset everything and the transforms on Rviz are fine now, but I still get the error and mapping problem.

Is there a fix for this transform problem? Could it be a synchronization issue even if I set use_sim_time to true? I've been struggling with this all day, and I don't understand what the problem could be...

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-10-26 13:47:35.390362

Comments

Not sure if this is entirely relevant, but I have had a lot of problems with running stage simultaneously with another node which also broadcasts tf's, a lot of rviz confusion and error messages occurred until I finally said screw it and commented out the tf broadcasters in the stageros wrapper

jgilsenan gravatar image jgilsenan  ( 2013-08-31 10:15:05 -0600 )edit

after which the errors all went away, possibly because I was in control of all of the tf's. Like I said, not sure if it's relevant, but if you run out of ideas try it.

jgilsenan gravatar image jgilsenan  ( 2013-08-31 10:16:31 -0600 )edit

Looks to me a timing problem: the "Most recent transform: 1377807... s" looks horrible. But on hydro same launch file works fine (not including your rl_lab_controllers package). So I'll try a) comment rl_lab_controllers. b) rostop

jorge gravatar image jorge  ( 2013-09-01 21:13:01 -0600 )edit

It's very weird, I tried my program on another computer and it worked better (not perfectly, but I could at least run my tests). Seems like Stage has some issues.

Zayin gravatar image Zayin  ( 2013-09-24 05:04:45 -0600 )edit

try to include Not sure about it, but solved one issue for me!

Sudeep gravatar image Sudeep  ( 2014-05-06 16:28:53 -0600 )edit