Open jianhuaz opened 3 weeks ago
When debugging AutoWare Universe, I found that the calculation result was wrong. May I ask which part was wrong?
projector_type: TransverseMercator vertical_datum: WGS84 map_origin: latitude: 27.855293457897343 longitude: 113.68145973280252 altitude: 62.200000
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; }
geo_point.latitude::::27.858572 ---> projected_local_point.x:-532.046651 geo_point.longitude::::113.676056 ---> projected_local_point.y:363.137080
<?xml version="1.0" encoding="UTF-8"?>
Why do you think it's wrong?
@poggenhans hi, It doesn't match the actual scene. Should GNSS bias be considered?
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"?>