From 87a3a8297cf36e0cda3d05802c64cb795bbd2e93 Mon Sep 17 00:00:00 2001 From: Yu Asabe Date: Wed, 6 Apr 2022 11:10:25 +0900 Subject: [PATCH] Change timestamp to unix, remove unnecessary logging --- src/cpm_application.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cpm_application.cpp b/src/cpm_application.cpp index 9c52167..2504f98 100644 --- a/src/cpm_application.cpp +++ b/src/cpm_application.cpp @@ -138,7 +138,7 @@ namespace v2x { if (poc != NULL) { for (int i = 0; i < poc->list.count; ++i) { - RCLCPP_INFO(node_->get_logger(), "[INDICATE] Object: #%d", poc->list.array[i]->objectID); + // RCLCPP_INFO(node_->get_logger(), "[INDICATE] Object: #%d", poc->list.array[i]->objectID); CpmApplication::Object object; double x1 = poc->list.array[i]->xDistance.value; @@ -427,7 +427,7 @@ namespace v2x { sending_ = true; - printObjectsList(cpm_num_); + // printObjectsList(cpm_num_); // RCLCPP_INFO(node_->get_logger(), "[CpmApplication::send] Sending CPM..."); @@ -623,7 +623,8 @@ namespace v2x { return; } - int64_t timestamp = duration_cast(runtime_.now().time_since_epoch()).count(); + int64_t timestamp = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + int perceivedObjectCount = 0; if (cpm->cpm.cpmParameters.numberOfPerceivedObjects) { perceivedObjectCount = cpm->cpm.cpmParameters.numberOfPerceivedObjects;