Repository navigation
Conversation
ElevationMap.input_image() projects map points with K @ (R @ p + t) and places the camera at -R.T @ t, so R, t must map map coordinates into the camera frame. The callback looked up (map_frame, camera) instead, which is the camera pose in the map (camera -> map), so semantic images were projected from the wrong place and orientation. The ROS 1 node passes lookupTransform(sensorFrame, mapFrame), i.e. map -> camera. Adds a regression test with a real tf2 buffer.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ElevationMap.input_image()expectsR, tthat take map coordinates into the camera frame: it projects map points withK @ (R @ p + t)and puts the camera at-R.T @ t.The ROS 2 node's
image_callbacklooks up(map_frame, camera_frame), which is the camera pose in the map (camera → map). As a result, image layers are projected from the wrong position and orientation. The ROS 1 node passeslookupTransform(sensorFrame, mapFrame), which is map → camera.Fix
image_callbacknow looks up(camera_frame, map_frame).tests/test_image_callback_transform.pybuilds a realtf2_ros.Bufferholding a rotated, offset camera pose and checks that theR, thanded toinput_image:(0, 0, 1);Testing
Run in a
ros:jazzycontainer with a GPU:ros2HEAD (that point lands at(4, 1.5, -1.5)in camera coordinates) and passes with the fix.elevation_mapping_cupy/testspass.End to end: I replayed a 30 s hiking clip (lidar, TF, camera frames) into
elevation_mapping_node, fed by a node that publishes 3-channel semantic images (risk / steppable / preferred_area).With the fix, the trail lands under the robot's path.
Note: on
ros2HEAD, image fusion itself is still disabled.input_image()raisesAttributeError: 'ElevationMap' object has no attribute 'uv_correspondence'because the image buffers are never allocated. The end-to-end run above therefore usedpascal-roth/b2w-wild-navigation-semantic-layers(e9722d1, which restores them) with this commit cherry-picked; it applies cleanly there. The unit test runs onros2because it mocks the map.Fork PRs skip the self-hosted CI, so the results above are from local runs.