Skip to content

Conversation

Fredrikhb
Copy link

@Fredrikhb Fredrikhb commented Sep 23, 2025

This is a fix specifically for how cp.roll is being used. (This intentionally excludes my other orientation fix (transpose on publish, polygon x/y., which fixes the rotation of the whole elevation grid.)

Problem: As the robot moves, the entire elevation layer creeps diagonally and stretches features.

Cause: cp.roll(..., axis=(1,2)) expects shifts as [rows(y), cols(x)]. Code used [dx, dy] inside the methods "move" and "move_to".

Fix: Pass [dy, dx] as argument to shift_map_xy instead of [dx, dy].

Evidence: before fix, map shifts diagonally on each update call. Origin of the whole elevation_map_raw becomes gradually shifted and features gets stretched into ridges as a result. After fix, map remains anchored to map frame and features are accurately captured where they are. Origin of elevation_map_raw remains consistent with base_link.

Both pictures are taken at exactly 10.0 seconds of simulation time, without and with fix respectively.

Before:
image

After:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant