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

Commit

Permalink
fixed osi coordinates point cloud conversion to gl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Haoyuan committed Oct 8, 2018
1 parent 77a9f8b commit 728d8b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osiparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ OsiParser::ParseSensorData(const osi3::SensorData &sensorData,
float color = ldd.detection().Get(j).intensity();
// We measure azimuth clockwise (typical in navigation, but in contrast to the standard spherical coordinates)
// x: up, y: out of monitor, z: right
QVector3D posxyz(pos.distance()*cos(pos.azimuth())*cos(pos.elevation()), 0, pos.distance()*sin(pos.azimuth())*cos(pos.elevation()));
QVector3D posxyz(pos.distance()*cos(pos.azimuth())*cos(pos.elevation()), 0, (-1)*pos.distance()*sin(pos.azimuth())*cos(pos.elevation()));
// ToDo: transform according to mounting position of sensor
PointStruct p = { posxyz, color};
pointMessage.append(p);
Expand Down Expand Up @@ -745,4 +745,4 @@ ObjectType
OsiParser::GetObjectTypeFromOsiObjectType(const osi3::TrafficLight_Classification_Mode& objectType)
{
return ObjectType::TrafficLight;
}
}

1 comment on commit 728d8b3

@MEpping
Copy link
Contributor

@MEpping MEpping commented on 728d8b3 Oct 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was correct before.. can you explain why you changed the sign? Did you read the comment?

Please sign in to comment.