Hello,
I am trying to locate centroid of an object i see in the image.
I understood how to translate from camera coordinates to lat/long but I am struggling a bit on obtaining the camera coordinates of desired points.
I have the following questions:
- If I am using only one camera and no gnss is there a difference between camera computed position and fusion one? (e.g fusion uses the IMU inside the camera to improve localization)?
- If I enable gnss fusion, and I get the positions from :
fusion.get_position(fused_position)
will it be different from the position I get from zed.get_position or not since the gnss is employed only to compute the calibration between VIO and GNSS? I mean does gnss data somehow influence the position even in world coordinates (not lat/long)?
- Ultimately what I need is:
fusion.retrieve_measure(point_cloud_fusion,uuid,sl.MEASURE.XYZ)
because I need the real world coordinates of objects I detect in the image. When I do that how do I know which frame the retrieved measure refers to ? if I run
point_cloud_fusion.timestamp.get_nanoseconds()
I always get 0. Furthermore sometimes I get nan data.
I could do
zed.retrieve_measure(point_cloud,sl.MEASURE.XYZ)
but then I would get less accurate positioning right?
But if I do:
fusion.retrieve_measure(point_cloud_fusion,uuid,sl.MEASURE.XYZ)
How do I know the timestamp of the image of which i am retrieving the measure?
Actually the best thing would be being able to retrieve the measure of a specified timestamp in order to obtain the measure after the gnss and vio calibration has been performed. Is that possible?
The issue you are experiencing has been fixed internally, and is currently planned to appear in the version 4.2 of the ZED SDK.
In the meantime, I can suggest using:
fusion.getCurrentTimestamp()
https://www.stereolabs.com/docs/api/classsl_1_1Fusion.html#ad380aebc08e4784f8f574b7c04ecdfc5
I get the following
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'pyzed.sl.Fusion' object has no attribute 'getCurrentTimestamp'here
I think that the function you are talking about is only for C++ and not for python…
Hi @Prospecto,
Sorry the methods are written in snake_case in the python API, so it should be: get_current_timestamp
, however I have noticed that the method is actually missing from the API.
I have logged the issue internally so we can fix this method as well
So right now there’s no way I can retrieve the fusion timestamp?
Or is it missing just from the docs? Because I tried fusion.get_current_timestamp() but stil not getting anything.
That is correct there is no way to retrieve the timestamp from fusion, these will be available in the next patch of the ZED SDK.
I’ve checked and the python method is missing from the API entirely, not only the docs.
Ok, thanks for the infos.
So, is there a way I can know which image I am processing? I am doing object detection and I want to locate objects in real world. If I am gonna use fusion.retrieve_image and fusion.retrieve_measure are they gonna be synchronized?
All data coming from fusion after running fusion.process
with a SUCCESS error code will be synchronized.
This applies to image, depth, positional tracking and body tracking data.