Closed dnatividade closed 9 months ago
The return type of VehicleDataProvider::position()
is an artery::Position
, see https://github.com/riebl/artery/blob/cedc4ea9f4c05d00c323eddceedf1bedd2e2493e/src/artery/utility/Geometry.h#L27
Hence, you can access the Cartesian coordinate (x in the following example) in meters with mVehicleDataProvider->position().x.value()
.
It worked out! Thank you very much.
For each car, I need to print the information on the terminal:
ID: XX | Speed: XX m/s | Position: XX
I was able to print the ID and speed as follows:
And I can get the position like this:
mVehicleDataProvider->position()
But how do I convert this to a format that can print to the terminal.PS: I actually need to print to a file on disk, but I want to do that in the terminal first.