Skip to content

Commit

Permalink
Enable to see the OSMPDummySensor SensorData output in osi-visualizer. (
Browse files Browse the repository at this point in the history
#36)

* Enable to see the OSMPDummySensor SensorData output in osi-visualizer.

* Fix whitespace, style issues of candidate addition
  • Loading branch information
haoyuanying authored and jdsika committed May 15, 2018
1 parent 534763c commit 14852f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/OSMPDummySensor/OSMPDummySensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ fmi2Status COSMPDummySensor::doCalc(fmi2Real currentCommunicationPoint, fmi2Real
obj->mutable_base()->mutable_dimension()->set_length(veh.base().dimension().length());
obj->mutable_base()->mutable_dimension()->set_width(veh.base().dimension().width());
obj->mutable_base()->mutable_dimension()->set_height(veh.base().dimension().height());

osi3::DetectedMovingObject::CandidateMovingObject* candidate = obj->add_candidate();
candidate->set_type(veh.type());
candidate->mutable_vehicle_classification()->CopyFrom(veh.vehicle_classification());
candidate->set_probability(1);

normal_log("OSI","Output Vehicle %d[%d] Probability %f Relative Position: %f,%f,%f (%f,%f,%f)",i,veh.id().value(),obj->header().existence_probability(),rel_x,rel_y,rel_z,obj->base().position().x(),obj->base().position().y(),obj->base().position().z());
i++;
} else {
Expand Down

0 comments on commit 14852f5

Please sign in to comment.