From 59ecab62bdad26dae642931f7a51bafbcb37f14f Mon Sep 17 00:00:00 2001 From: Yu Asabe Date: Thu, 19 May 2022 19:59:42 +0900 Subject: [PATCH] Run publishCpmSenderObject in indicate function --- src/cpm_application.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cpm_application.cpp b/src/cpm_application.cpp index 893a601..a906ba9 100644 --- a/src/cpm_application.cpp +++ b/src/cpm_application.cpp @@ -131,6 +131,11 @@ namespace v2x { // RCLCPP_INFO(node_->get_logger(), "[CpmApplication::indicate] heading: %d", heading); // RCLCPP_INFO(node_->get_logger(), "[CpmApplication::indicate] orientation: %f", orientation); + + // Publish CPM Sender info to /v2x/cpm/sender through V2XNode function + node_->publishCpmSenderObject(x_mgrs, y_mgrs, orientation); + + // Get PerceivedObjects receivedObjectsStack.clear(); @@ -452,6 +457,7 @@ namespace v2x { StationDataContainer_t *&sdc = cpm.cpmParameters.stationDataContainer; sdc = vanetza::asn1::allocate(); sdc->present = StationDataContainer_PR_originatingVehicleContainer; + OriginatingVehicleContainer_t &ovc = sdc->choice.originatingVehicleContainer; ovc.speed.speedValue = 0; ovc.speed.speedConfidence = 1;