Skip to content

Commit d31cf36

Browse files
Merge pull request #24 from NVIDIA-ISAAC-ROS/hotfix-release-dp3.1-2
Update timestamp behavior
2 parents 538c7bb + 4ace417 commit d31cf36

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

isaac_ros_dope/gxf/dope/dope_decoder.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,13 @@ gxf_result_t DopeDecoder::tick() noexcept {
465465
}
466466
auto posearray_message = maybe_posearray_message.value();
467467

468+
auto maybe_added_timestamp = AddInputTimestampToOutput(
469+
posearray_message, maybe_beliefmaps_message.value());
470+
if (!maybe_added_timestamp) {
471+
GXF_LOG_ERROR("Failed to add timestamp");
472+
return gxf::ToResultCode(maybe_added_timestamp);
473+
}
474+
468475
// Copy tensor data over to a more portable form
469476
std::array<cv::Mat, kInputMapsChannels> maps;
470477
const int input_map_row{belief_maps->shape().dimension(2)};
@@ -536,13 +543,7 @@ gxf_result_t DopeDecoder::tick() noexcept {
536543
return GXF_FAILURE;
537544
}
538545
}
539-
540-
auto maybe_added_timestamp = AddInputTimestampToOutput(
541-
posearray_message, maybe_beliefmaps_message.value());
542-
if (!maybe_added_timestamp) {
543-
return gxf::ToResultCode(maybe_added_timestamp);
544-
}
545-
546+
546547
return gxf::ToResultCode(
547548
posearray_transmitter_->publish(std::move(posearray_message)));
548549
}

0 commit comments

Comments
 (0)