fzi-forschungszentrum-informatik / Lanelet2

Map handling framework for automated driving
BSD 3-Clause "New" or "Revised" License
800 stars 327 forks source link

Projector forward convert error #370

Open jianhuaz opened 3 weeks ago

jianhuaz commented 3 weeks ago

When debugging AutoWare Universe, I found that the calculation result was wrong. May I ask which part was wrong?

map_projector_info.yaml

projector_type: TransverseMercator vertical_datum: WGS84 map_origin: latitude: 27.855293457897343 longitude: 113.68145973280252 altitude: 62.200000

C++ Code

LocalPoint project_forward(const GeoPoint & geo_point, const MapProjectorInfo & projector_info) { std::unique_ptr projector = get_lanelet2_projector(projector_info); lanelet::GPSPoint position{geo_point.latitude, geo_point.longitude, geo_point.altitude};

lanelet::BasicPoint3d projected_local_point;

projected_local_point = projector->forward(position);

projected_local_point.z() = geo_point.altitude - projector_info.map_origin.altitude;

LocalPoint local_point;

local_point.x = projected_local_point.x(); local_point.y = projected_local_point.y(); local_point.z = projected_local_point.z();

return local_point; }

convert the result

geo_point.latitude::::27.858572 ---> projected_local_point.x:-532.046651 geo_point.longitude::::113.676056 ---> projected_local_point.y:363.137080

lanelet2_map.osm

<?xml version="1.0" encoding="UTF-8"?>

... ... ...
jianhuaz commented 3 weeks ago

lanelet2_map.osm

<?xml version="1.0" encoding="UTF-8"?>

... ... ...
poggenhans commented 3 weeks ago

Why do you think it's wrong?

jianhuaz commented 3 weeks ago

@poggenhans hi, It doesn't match the actual scene. Should GNSS bias be considered?