imu.pose.getTranslation() Returns Zero When Parsing SVO2 File on Windows (ZED SDK 5.1.2)

Hi everyone,

I’m currently working with a ZED X (SN:40200550) camera paired with a ZED BOX, recording SVO2 files using ZED Studio. I then transfer the recorded SVO2 files to my Windows PC for post-processing, using the export_sensors sample code provided with ZED SDK 5.1.2.

The issue I’m encountering is that imu.pose.getTranslation() consistently returns (0.0, 0.0, 0.0) for all frames, while other IMU fields — such as linear_acceleration, angular_velocity, and pose.getOrientation() — appear to contain valid data.

Sample Output

Timestamp (ns) AccX AccY AccZ GyroX GyroY GyroZ TransX TransY TransZ OrientX OrientY OrientZ OrientW
1775632977218783000 -0.033617 -0.663224 9.770789 0.215787 -0.180081 -0.122402 0.000000 0.000000 0.000000 -0.034394 0.681284 0.034810 0.730382

As shown above, the translation values are always zero, while orientation data looks reasonable.

Relevant Code Snippet

cpp

while (true) {
    sl::ERROR_CODE grab_state = zed.grab();
    if (grab_state == sl::ERROR_CODE::END_OF_SVOFILE_REACHED) {
        std::cout << "\rProgress: 100% (End of file)" << std::endl;
        break;
    }
    else if (grab_state != sl::ERROR_CODE::SUCCESS) {
        std::cout << "Error during grab: " << grab_state << std::endl;
        break;
    }
    current_frame = zed.getSVOPosition();
    if (total_frames > 0 && current_frame % 100 == 0) {
        float progress = (float)current_frame / total_frames * 100.0f;
        std::cout << "\rProgress: " << std::fixed << std::setprecision(1) << progress << "%" << std::flush;
    }

    all_sensors_data_in_current_frame.clear();
    zed.getSensorsDataBatch(all_sensors_data_in_current_frame);

    for (const auto& sensor_data : all_sensors_data_in_current_frame) {
        if (sensor_data.imu.is_available) {
            imu_file << sensor_data.imu.timestamp.getNanoseconds() << "\t"
                << sensor_data.imu.linear_acceleration.x << "\t"
                << sensor_data.imu.linear_acceleration.y << "\t"
                << sensor_data.imu.linear_acceleration.z << "\t"
                << sensor_data.imu.angular_velocity.x << "\t"
                << sensor_data.imu.angular_velocity.y << "\t"
                << sensor_data.imu.angular_velocity.z << "\t"
                << sensor_data.imu.pose.getTranslation().tx << "\t"
                << sensor_data.imu.pose.getTranslation().ty << "\t"
                << sensor_data.imu.pose.getTranslation().tz << "\t"
                << sensor_data.imu.pose.getOrientation().ox << "\t"
                << sensor_data.imu.pose.getOrientation().oy << "\t"
                << sensor_data.imu.pose.getOrientation().oz << "\t"
                << sensor_data.imu.pose.getOrientation().ow << std::endl;
        }
    }
}

My Questions

  1. Is sensor_data.imu.pose.getTranslation() expected to always return zero in this context? Is the translation component not stored/computed for raw IMU pose data in SVO2 files?

  2. If this is by design, what is the correct approach to obtain the IMU’s positional data from an SVO2 recording?

  3. Is there any additional initialization or positional tracking configuration required before getTranslation() can return meaningful values?

Any help or clarification would be greatly appreciated. Thank you!