gazebosim / gazebosim/sdformat
NavSat / GPS sensor noise has wrong description? Or gz-sensors wrong implementation?
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
`navsat/horizontal` noise says the noise is in meters:
https://github.com/gazebosim/sdformat/blob/ed018d8758f475c3f0ec8247a5616b380f564856/sdf/1.12/navsat.sdf#L10
NavSat sensor in gz-sensors adds noise in degrees of lat/lon:
https://github.com/gazebosim/gz-sensors/blob/d266990ace6bb0d4da1ac79e55731d3b47890616/src/NavSatSensor.cc#L180
this->SetLatitude(GZ_DTOR(iter->second->Apply(this->Latitude().Degree())));
There is a related issue in https://github.com/gazebosim/gz-sensors/issues/325 .
We need to decide what is correct and what is not.
I'd vote for meters because that is how the error really manifests. Error in degrees of longitude has a different metric meaning for each latitude and is thus much less useful.
The migration consequences of choosing meters wouldn't be that bad. If somebody had specified noise of 1e-5 to get a +- meter precision, he'd end up with a super precise sensor. If we chose that degrees are correct, the user would end up with a GPS that jumps kilometers.
---
To be precise, this is what gz-sim currently does:
- position:
- horizontal: degrees
- vertical: meters
- velocity:
- horizontal: meters/s
- vertical: meters/s
Contributor guide
Research direction
Compare the noise definition in sdf/1.12/navsat.sdf with the degree-based handling in gz-sensors/src/NavSatSensor.cc, and review the related gz-sensors issue 325. First establish whether horizontal position noise is specified in meters or degrees; done means the specification and implementation agree and the migration impact is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100