Skip to content

Commit

Permalink
fixed plotting ar tag poses
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoussan committed Jun 3, 2024
1 parent 664e65f commit acdfaf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/localization_analysis/src/offline_replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ void OfflineReplay::Run() {
pose_extrapolator_wrapper_.LocalizationStateCallback(*localization_msg);
SaveMsg(*localization_msg, TOPIC_GRAPH_LOC_STATE, results_bag_);
}
if (latest_ar_msg_) {
if (latest_ar_msg_ && graph_localizer_simulator_->WorldTDock()) {
if (static_cast<int>(ar_msg->landmarks.size()) >= params_.ar_min_num_landmarks) {
const gtsam::Pose3 world_T_body =
const gtsam::Pose3 world_T_body = (*graph_localizer_simulator_->WorldTDock())*
lc::PoseFromMsgWithExtrinsics(ar_msg->pose, params_.body_T_dock_cam.inverse());
const lc::Time timestamp = lc::TimeFromHeader(ar_msg->header);
SaveMsg(PoseMsg(world_T_body, timestamp), TOPIC_AR_TAG_POSE, results_bag_);
Expand Down

0 comments on commit acdfaf5

Please sign in to comment.