Tencent / Tencent/TAD_Sim

系统反算的经纬度存在问题?

Open
#67 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
465
Forks
122
PR merge metrics
No merged PRs in 30d

Description

你好,

我在导入一个xodr文件(由实际真实环境制作得出),该文件的投影方式是:

<geoReference><![CDATA[+proj=tmerc +lat_0=22.5114810444912479 +lon_0=114.03711701865901 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs ]]></geoReference>

在实际仿真时发现,ego的经纬度信息和实际环境的经纬度信息不相符,经查阅源码,发现经纬度反算好像有问题?
common/map_sdk/map_import/src/OpenDriveParse.cpp中的170行的get_lane_scale_toEnu函数中:

transform_pts(points);
transform_pts(refs);
for (auto& itPt : points) {
  coord_trans_api::lonlat2enu(itPt.x, itPt.y, itPt.z, refs.at(0).x, refs.at(0).y, refs.at(0).z);
}

这里的计算方式是分别计算points、refs的WGS8经纬度信息,再叠加求解points实际对应的坐标信息。
在opendrive规范中: https://www.asam.net/index.php?eID=dumpFile&t=f&f=3768&token=66f6524fbfcdb16cfb89aae7b6ad6c82cfc2c7f2
比如7.1小节,点坐标是Start position (x inertial)使用惯性系,而惯性系是相对与origin坐标的,需要先计算该offset后,再计算经纬度,不知道上述points的坐标是否考虑这个细节,麻烦您检查一下?
或者指引一下,相关offset计算的代码?
非常感谢~

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in common/map_sdk/map_import/src/OpenDriveParse.cpp at get_lane_scale_toEnu around line 170. Trace transform_pts and the points/refs passed to coord_trans_api::lonlat2enu, then compare their handling with the OpenDRIVE inertial-coordinate and origin-offset rules in section 7.1. Done means the ego coordinates match the supplied tmerc geoReference for the reported xodr environment, with the relevant offset behavior clarified or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
autonomous-driving
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.