usdot-fhwa-stol / carma-platform

CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication. Doxygen Source Code Documentation :
https://usdot-fhwa-stol.github.io/documentation/carma-platform/
399 stars 122 forks source link

Unify lat/lon to map conversions in the system #1285

Closed msmcconnell closed 3 years ago

msmcconnell commented 3 years ago

Types of Issue

Descriptive summary

In the current carma-platform version there are two ways to convert lat/lon information into the map frame. The first approach is to use the Proj library and the /georeference topic to get the projection of the lanelet2 map and use that to perform conversion via the lanelet2_extension/LocalFrameProjector class. The second approach is to use the transform from ECEF frame "earth" to "map" and the wgs84_utils package from carma-utils to perform the conversion. However, this second approach will give somewhat different results compared to the proj library if the map projection does not contain a linear relationship with the transform between earth and map.

This leads to problems where the reported GPS point is farther off than reality and the creation of route files can be very difficult.

To resolve this the second approach should be removed from the system and Proj should be used exclusively for performing lat/lon to map conversions.

Carma version where this issue was discovered

develop after 3.5 but present in most 3+ versions before that

Expected behavior

After this fix it should be possible to select route points directly in josm after the projection for a given map is added to the JOSM viewer. Additionally, the GPS point shown in rviz should be much closer to the localization fix than is currently occuring.

Actual behavior

See description

Steps to reproduce the actual behavior

N/A

Related work

msmcconnell commented 3 years ago

Resolved by above PRs