Using SLAM Gmapping on Stage with Fuerte [closed]
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:
Oh, and I just noticed this on Rviz: 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...
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
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.
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
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.
try to include Not sure about it, but solved one issue for me!