How do I orient fake_localization with stage? [closed]

Hello,

I am confused about coordinate frame orientation when using stage and fake_localization. First of all, I have my simulation working with amcl, but I want to use fake_localization to get better performance.

So, I have a worldfile for stage that loads a map. The map origin is the bottom left corner, and I give stage an offset, so that the map is centered in the stage window: (from my stage .world file)

floorplan (
# Size in meters (the image has 870x672 pixels x 0.05 resolution in the .yaml)
size [43.5 33.6 1]
# Where to make the origin (rotate and offset)
pose [21.75 16.8 0 0] # Center of the image
bitmap "../../maps/3rdFloorNorth.pgm"
)


Next, I include fake_localization in my launch file.

<node pkg="fake_localization" type="fake_localization" name="fake_localization" respawn="false">
<param name="delta_x" value="0"/>
<param name="delta_y" value="0"/>
<param name="delta_yaw" value="0"/>


</node>

The issue is, the odom and amcl_pose do not match. In the example above, I put a robot in the world file at position [25 28 0 0]. I can see this when I rostopic echo odom. However, when I rostopic echo amcl_pose, I get x=28 and y=-25! Is there a rotation happening here? I thought that the /map was loaded with the origin at the bottom left corner, same as with stage? Is this something that I set with the fake_localization delta values, or is there something bigger happening here?

edit retag reopen merge delete