Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit 728d8b3

Browse files
author
Haoyuan
committed
fixed osi coordinates point cloud conversion to gl.
1 parent 77a9f8b commit 728d8b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/osiparser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ OsiParser::ParseSensorData(const osi3::SensorData &sensorData,
482482
float color = ldd.detection().Get(j).intensity();
483483
// We measure azimuth clockwise (typical in navigation, but in contrast to the standard spherical coordinates)
484484
// x: up, y: out of monitor, z: right
485-
QVector3D posxyz(pos.distance()*cos(pos.azimuth())*cos(pos.elevation()), 0, pos.distance()*sin(pos.azimuth())*cos(pos.elevation()));
485+
QVector3D posxyz(pos.distance()*cos(pos.azimuth())*cos(pos.elevation()), 0, (-1)*pos.distance()*sin(pos.azimuth())*cos(pos.elevation()));
486486
// ToDo: transform according to mounting position of sensor
487487
PointStruct p = { posxyz, color};
488488
pointMessage.append(p);
@@ -745,4 +745,4 @@ ObjectType
745745
OsiParser::GetObjectTypeFromOsiObjectType(const osi3::TrafficLight_Classification_Mode& objectType)
746746
{
747747
return ObjectType::TrafficLight;
748-
}
748+
}

0 commit comments

Comments
 (0)