zed-sdk
zed-sdk copied to clipboard
fusion.camera_to_geo has unexpected behavior
Preliminary Checks
- [X] This issue is not a duplicate. Before opening a new issue, please search existing issues.
- [X] This issue is not a question, feature request, or anything other than a bug report directly related to this project.
Description
In geotracking/playback/python/playback.py I expect to fused_position and current_geopose to represent the same point in space. However, if I fusion.camera_to_geo(fused_position,fused_geopose) and compare the lat,long,alt of the two points, they can be different by hundreds of meters.
I want to be able to take a point from the pointcloud and compute its geocoordinates. However, this basic step of knowing what the baseline pose should be to add it to seems to be broken.
Steps to Reproduce
- Add this code to playback.py
from geopy import distance
def lat_long_alt(geopose):
lat = geopose.latlng_coordinates.get_latitude()
long = geopose.latlng_coordinates.get_longitude()
alt = geopose.latlng_coordinates.get_altitude()
- Inside playback.py inside the if statement if current_geopose_satus == sl.GNSS_CALIBRATION_STATE.CALIBRATED:
latitude_cgp, longitude_cgp, altitude_cgp = lat_long_alt(current_geopose)
fused_geopose = sl.GeoPose()
fusion.camera_to_geo(fused_position,fused_geopose)
lat_f,long_f,alt_f = lat_long_alt(fused_geopose)
d = np.sqrt(distance.distance((latitude_cgp,longitude_cgp),(lat_f,long_f)).m**2 + (altitude_cgp - alt_f)**2)
print()
print("Distance between estimate and measurement: ",d)
-
Run on a video and note that d is not always 0.
return lat * 180 / np.pi, long * 180 / np.pi, alt
Expected Result
I expect 0s
Actual Result
I get nonzeros.
ZED Camera model
ZED2i
Environment
OS: Windows
Anything else?
No response