Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure in vector mapping due to points having negative xy-coordinates in pointcloud map #9038

Open
3 tasks done
wsung1 opened this issue Oct 5, 2024 · 3 comments
Open
3 tasks done
Labels
status:stale Inactive or outdated issues. (auto-assigned) type:bug Software flaws or errors.

Comments

@wsung1
Copy link

wsung1 commented Oct 5, 2024

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

Hi, Autoware community,
The mapping site I'm currently working on spans MGRS zones 52S CD and BD.
Because the origin of the map frame is based on the MGRS 52S CD coordinate system, some points in the pointcloud map have negative xy-coordinates.
Based on this pointcloud map, I created a vector map using a bag2lanelet package.
When I loaded the created lanelet into the Vector Map Builder, it appeared correct, but I found an error indicating that some points have negative xy-coordinates in the MGRS coordinate system.
I overlooked this Any idea to address this problem?error, as the map seemed plausible.
However, when I imported the resulting OSM file into Autoware, the lanelet was totally distorted.
The grey line that should encircle the building in the center is missing, as shown below.
negative coordinate error but fine lanelet in Vector Map Builder
distorted lanelet in Autoware Universe
Has anyone encountered similar issues or have any suggestions for addressing this problem? Your input would be greatly appreciated!
Thanks in advance!

Expected behavior

As described above

Actual behavior

As described above

Steps to reproduce

As described above

Versions

No response

Possible causes

No response

Additional context

No response

@idorobotics idorobotics added the type:bug Software flaws or errors. label Oct 14, 2024
@VRichardJP
Copy link
Contributor

VRichardJP commented Oct 15, 2024

In your lanelet map OSM file, the <node> coordinates are available in 2 different forms: latitude/longitude and MGRS. For example:

<node id="30" lat="13.801094196677974" lon="100.54001559798192">
    <tag k="mgrs_code" v="47PPR664262"/>
    <tag k="local_x" v="66467.4103"/>
    <tag k="local_y" v="26262.2704"/>
    <tag k="ele" v="-27.514"/>
  </node>

You say your map overlaps over 2 MGRS zones, which is likely the cause of issue. For example, Autoware may not check the mgrs_code or local_x/local_y files under some conditions, while the lanelet map editor will correctly parse them (see https://autowarefoundation.github.io/autoware.universe/main/map/autoware_map_projection_loader/).

@VRichardJP
Copy link
Contributor

For example if you have set the map projector to MGRS in the map_projector_info.yaml file, then the local x/y coordinates are ignored and only each lat and lon values are used. This projector assumes all points are in the same MGRS zone. If that is not the case, you should see the following warning:

https://github.com/autowarefoundation/autoware_lanelet2_extension/blob/c148815f4483a9acd51bd25abcb26a7a5a99381d/autoware_lanelet2_extension/lib/mgrs_projector.cpp#L63-L68

Copy link

stale bot commented Dec 14, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:stale Inactive or outdated issues. (auto-assigned) type:bug Software flaws or errors.
Projects
None yet
Development

No branches or pull requests

3 participants