Skip to content

[codex] Add GICP RViz trajectory overlays#5

Open
FieldDiTian wants to merge 1 commit into
augcog:art-jazzyfrom
FieldDiTian:rviz
Open

[codex] Add GICP RViz trajectory overlays#5
FieldDiTian wants to merge 1 commit into
augcog:art-jazzyfrom
FieldDiTian:rviz

Conversation

@FieldDiTian

Copy link
Copy Markdown

Summary

  • Publish a scan-time-aligned /gt_ins path for RViz/debug comparison against the final localization path.
  • Publish accepted-GICP-only trajectory overlays as both the current gicp/localization/gicp_only_path segment and persistent orange gicp/localization/gicp_only_segments marker history.
  • Wire the debug_pub and verbose_scan_log launch arguments into gicp_localization parameters so the debug/RViz publishers can actually be enabled from the normal launch flow.
  • Document the default RViz colors and topic semantics in gicp_localization/README.md.

Why

/gicp/localization/path is the final adopted localization result, so it includes accepted GICP poses as well as IMU fallback and GT recovery snaps. That made RViz demos ambiguous: a strange point on the final path did not directly show whether GICP accepted that scan or whether the final output came from fallback/recovery. The added overlays make that distinction visible on the same replay timeline.

Impact

  • Green Trajectory Path remains /gicp/localization/path, the final adopted localization trajectory.
  • Orange GICP-only Segments only advances on scans accepted by GICP and breaks during IMU fallback or GT recovery.
  • Blue GT INS Reference is sampled at the same LiDAR scan timestamps as the final path for time-aligned visual comparison.

Validation

  • git diff --check origin/art-jazzy...HEAD
  • source /opt/ros/jazzy/setup.bash && source /home/roar/Documents/race_common/install/setup.bash && colcon build --packages-select gicp_localization --symlink-install
  • Live GICP/RViz replay on run5 data against the run3 local-ENU map verified the expected publishers/subscribers for /gicp/localization/path, /gicp/localization/gicp_only_segments, and /gt_ins.

@FieldDiTian FieldDiTian marked this pull request as ready for review July 2, 2026 19:09
Copilot AI review requested due to automatic review settings July 2, 2026 19:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds RViz/debug trajectory overlays to distinguish “final adopted localization” from “accepted-by-GICP-only” motion, and to provide a scan-time-aligned GT/INS reference path for visual comparison during playback and demos.

Changes:

  • Publish a scan-time-aligned /gt_ins nav_msgs/Path sampled at the same LiDAR scan timestamps as the localized path.
  • Publish accepted-GICP-only overlays as a “current segment” Path and a persistent “broken segments” MarkerArray history.
  • Expose debug_pub and verbose_scan_log as launch arguments and document overlay topic semantics / default RViz colors.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
gicp_localization/src/localization.cc Adds publishers, buffers, and publish logic for /gt_ins and accepted-GICP-only overlays.
gicp_localization/include/gicp_localization/localization.h Declares new publishers/state and buffers for the new overlays.
gicp_localization/launch/localization_with_tf.launch.py Wires new launch args into node parameters to enable debug/RViz publishers and scan logging.
gicp_localization/launch/localization.rviz Adds RViz displays for /gt_ins and gicp_only_segments.
gicp_localization/README.md Documents new topics plus default RViz overlay color semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3406 to +3425
if (this->last_scan_gicp_accepted_) {
if (!this->gicp_only_segment_active_) {
this->gicp_only_path_buffer_.clear();

visualization_msgs::msg::Marker segment;
segment.header.stamp = this->scan_stamp;
segment.header.frame_id = this->map_frame;
segment.ns = "gicp_only_segments";
segment.id = this->gicp_only_segment_next_id_++;
segment.type = visualization_msgs::msg::Marker::LINE_STRIP;
segment.action = visualization_msgs::msg::Marker::ADD;
segment.pose.orientation.w = 1.0;
segment.scale.x = 0.18;
segment.color.a = 1.0f;
segment.color.r = 1.0f;
segment.color.g = 0.55f;
segment.color.b = 0.0f;
this->gicp_only_segments_msg_.markers.push_back(segment);
this->gicp_only_segment_active_ = true;
}
Comment on lines +3431 to +3438
if (!this->gicp_only_segments_msg_.markers.empty()) {
geometry_msgs::msg::Point point;
point.x = pose_msg.pose.position.x;
point.y = pose_msg.pose.position.y;
point.z = pose_msg.pose.position.z;
this->gicp_only_segments_msg_.markers.back().points.push_back(point);
}
publish_gicp_only_segments();
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.

2 participants