# Getting positional tracking data from svo file

**URL:** <https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924>\
**Category:** Python\
**Tags:** imu\
**Created:** [January 16, 2025, 6:49pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924 "2025-01-16T18:49:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![benferpo](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/b/8edcca/32.png) [@benferpo](https://community.stereolabs.com/u/benferpo)\
**Post date:** [January 16, 2025, 6:49pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/1 "2025-01-16T18:49:46Z")

</div>

Hi, everyone.

I’m not expert in issues related with positional tracking. But, Can i get pose information of positional tracking from a recorded svo2 file?  
There is a method on python, get\_pose(), that gets a Transform class. From this structure I get an orientation data (quaternion), and translation, but this last data doesn’t change (always is 0,0,0).  
Any idea what could be going on? Thanks

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [January 17, 2025, 4:39pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/2 "2025-01-17T16:39:18Z")

</div>

Hi @benferpo  
you can use an SVO2 as input for an application ZED SDK-based.  
The information stored in the SVO2 (raw images and raw sensors data) will be used as if the camera used to record it were connected to the PC running the application.

Please read more on the [relevant documentation](https://www.stereolabs.com/docs/video/recording).

---

<div class="post-metadata">

**Author:** ![benferpo](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/b/8edcca/32.png) [@benferpo](https://community.stereolabs.com/u/benferpo)\
**Post date:** [January 29, 2025, 9:54am UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/3 "2025-01-29T09:54:49Z")

</div>

Thanks Myzhar for the answer.

I was finally able to get “two” pose information from the svo2 file:

- I get a first position, let’s say 1, which is calculated only from the IMU data zed\_imu.get\_pose()
- Another position 2 that also uses visual corrections and SLAM technology.  
camera\_pose = sl.Pose()  
tracking\_state = zed.get\_position(camera\_pose,sl.REFERENCE\_FRAME.CAMERA)

But I still don’t know why the first pose (which only uses IMU data) the translation values are always 0. I took the capture in a vehicle where the translation is expected to change (and so it does for pose 2)

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [January 29, 2025, 1:56pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/4 "2025-01-29T13:56:51Z")

</div>

Hi @benferpo  
are you using positional tracking `GEN_1` or `GEN_2`?

---

<div class="post-metadata">

**Author:** ![benferpo](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/b/8edcca/32.png) [@benferpo](https://community.stereolabs.com/u/benferpo)\
**Post date:** [January 29, 2025, 2:26pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/5 "2025-01-29T14:26:44Z")

</div>

I don’t know… 🙂

I’m using the default mode because I didn’t configure anything…

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [January 29, 2025, 2:29pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/6 "2025-01-29T14:29:31Z")

</div>

Please share a snippet of code

---

<div class="post-metadata">

**Author:** ![benferpo](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/b/8edcca/32.png) [@benferpo](https://community.stereolabs.com/u/benferpo)\
**Post date:** [January 29, 2025, 3:34pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/7 "2025-01-29T15:34:46Z")

</div>

Myzhar, reviewing the code I have seen that in the initialization part of positional tracking I have

```
tracking_params = sl.PositionalTrackingParameters() #set parameters for Positional Tracking
tracking_params.enable_imu_fusion = True
tracking_params.mode = sl.POSITIONAL_TRACKING_MODE.GEN_1
status = zed.enable_positional_tracking(tracking_params) #enable Positional Tracking
if status != sl.ERROR_CODE.SUCCESS:
	print("[Sample] Enable Positional Tracking : "+repr(status)+". Exit program.")
	zed.close()
	exit()

```

So, I’m using GEN\_1.

But remember that the pose data (number 1 in the above post) that gives me translation equal to 0 is the one that use only IMU data:

zed\_imu = sensors\_data.get\_imu\_data()  
pose\_1 = zed\_imu.get\_pose()

Because the pose 2 (the one that uses tracking parameters) give me translation different to zero

camera\_pose\_2 = sl.Pose()  
py\_translation = sl.Translation()  
py\_orientation = sl.Orientation()  
tracking\_state = zed.get\_position(camera\_pose\_2,sl.REFERENCE\_FRAME.CAMERA)

---

<div class="post-metadata">

**Author:** ![benferpo](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/b/8edcca/32.png) [@benferpo](https://community.stereolabs.com/u/benferpo)\
**Post date:** [February 5, 2025, 6:36pm UTC](https://community.stereolabs.com/t/getting-positional-tracking-data-from-svo-file/7924/8 "2025-02-05T18:36:36Z")

</div>

No answer to this question???
