Run publishCpmSenderObject in indicate function

This commit is contained in:
Yu Asabe 2022-05-19 19:59:42 +09:00
parent 65c92be3f9
commit 59ecab62bd
1 changed files with 6 additions and 0 deletions

View File

@ -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<StationDataContainer_t>();
sdc->present = StationDataContainer_PR_originatingVehicleContainer;
OriginatingVehicleContainer_t &ovc = sdc->choice.originatingVehicleContainer;
ovc.speed.speedValue = 0;
ovc.speed.speedConfidence = 1;