Skip to content

Honor "Show with initial pose" in step 2 raylib renderer - #520

Open
michalpelka wants to merge 1 commit into
mainfrom
mp/fix-show-with-initial-pose-step2
Open

Honor "Show with initial pose" in step 2 raylib renderer#520
michalpelka wants to merge 1 commit into
mainfrom
mp/fix-show-with-initial-pose-step2

Conversation

@michalpelka

Copy link
Copy Markdown
Contributor

The GLUT->raylib port of multi_view_tls_registration replaced PointCloud::render() (which branches on show_with_initial_pose) with ScanRenderer, whose draw()/drawTrajectories() only ever render at m_pose. The "Show with initial pose" checkbox therefore had no visible effect on the point clouds or trajectories in step 2 -- it only still influenced observation-picking intersection points and compute_rms(). This affected every session type; it was reported (#517) against E57 import because that's where comparing imported vs. registered poses is the first thing you do.

Add a useInitialPose flag to ScanRenderer::draw()/drawTrajectories(). The cached GPU buffers stay baked at m_pose; when the flag is set the per-scan delta (m_initial_pose * m_pose^-1) is folded into the MVP for that scan only -- the same technique drawCachedWithTransform() uses to preview a pose, so no buffer re-upload. The trajectory polyline uses the same MVP fold; the CPU-side overlays (IMU-diff lines, square outlines, orientation crosses) use m_initial_pose directly. The main display() call sites pass session.point_clouds_container.show_with_initial_pose; the loop-closure editor and single-scan preview draw() call sites are left at m_pose.

fixes #517

The GLUT->raylib port of multi_view_tls_registration replaced
PointCloud::render() (which branches on show_with_initial_pose) with
ScanRenderer, whose draw()/drawTrajectories() only ever render at m_pose.
The "Show with initial pose" checkbox therefore had no visible effect on
the point clouds or trajectories in step 2 -- it only still influenced
observation-picking intersection points and compute_rms(). This affected
every session type; it was reported (#517) against E57 import because
that's where comparing imported vs. registered poses is the first thing
you do.

Add a useInitialPose flag to ScanRenderer::draw()/drawTrajectories(). The
cached GPU buffers stay baked at m_pose; when the flag is set the per-scan
delta (m_initial_pose * m_pose^-1) is folded into the MVP for that scan
only -- the same technique drawCachedWithTransform() uses to preview a
pose, so no buffer re-upload. The trajectory polyline uses the same MVP
fold; the CPU-side overlays (IMU-diff lines, square outlines, orientation
crosses) use m_initial_pose directly. The main display() call sites pass
session.point_clouds_container.show_with_initial_pose; the loop-closure
editor and single-scan preview draw() call sites are left at m_pose.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FQ48ovXb5eJap4YZoPXoVd
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.

Show with initial points is not working after e57 import

1 participant