Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking not Initialize, Every time Pose gets null every time with all flavor. #45

Closed
pragnesh1234 opened this issue Apr 26, 2022 · 1 comment

Comments

@pragnesh1234
Copy link

Hii, @pekkaran

This demo is great for VIO.
I run this dome app and collect the VIO data but In this case, the tracking status does not Initialize every time and also getPose(); getting null every time.

And also checked c++ function for getting Pose, but it's fired -1 every time. Below are functions, we are using for the gets Pose, but it's not working.

Can you guide us on How we can Initialize the tracking points and get the Pose successfully?

  1. JNIEXPORT jdoubleArray JNICALL Java_org_example_viotester_AlgorithmWorker_getPose(
    JNIEnv *env, jobject) {
    auto algorithm = std::atomic_load(&algorithmPtr);
    if (algorithm) {
    recorder::Pose pose;
    bool hasPose = algorithm->pose(pose);
    // Pragnesh did updated this code
    if (!hasPose) {
    return NULL;
    }
    jdoubleArray result = env->NewDoubleArray(8);
    jdouble buf[8];
    buf[0] = pose.time;
    buf[1] = pose.position.x;
    buf[2] = pose.position.y;
    buf[3] = pose.position.z;
    buf[4] = pose.orientation.x;
    buf[5] = pose.orientation.y;
    buf[6] = pose.orientation.z;
    buf[7] = pose.orientation.w;
    env->SetDoubleArrayRegion(result, 0, 8, buf);
    return result;
    }
    return NULL;

  2. JNIEXPORT jint JNICALL Java_org_example_viotester_AlgorithmWorker_getTrackingStatus(
    JNIEnv *, jobject) {
    auto algorithm = std::atomic_load(&algorithmPtr);
    if (algorithm) return algorithm->trackingStatus();
    return -1;
    }

Here are logs :
2022-04-26 13:51:08.504 11144-12723/? E/pragnesh: focalLengthX 484.068 focalLengthY 483.6075 principalPointX 317.23218 principalPointY 241.6948
2022-04-26 13:51:08.505 11144-12723/? E/pragnesh: time 0.0 qx 0.0 qy 0.0 qz 0.0 qw 0.0 x 0.0 y 0.0 z 0.0
2022-04-26 13:51:08.505 11144-12723/? E/pragnesh: status -1
2022-04-26 13:51:08.537 11144-12723/? E/pragnesh: focalLengthX 484.068 focalLengthY 483.6075 principalPointX 317.23218 principalPointY 241.6948
2022-04-26 13:51:08.538 11144-12723/? E/pragnesh: time 0.0 qx 0.0 qy 0.0 qz 0.0 qw 0.0 x 0.0 y 0.0 z 0.0
2022-04-26 13:51:08.538 11144-12723/? E/pragnesh: status -1
2022-04-26 13:51:08.570 11144-12723/? E/pragnesh: focalLengthX 484.068 focalLengthY 483.6075 principalPointX 317.23218 principalPointY 241.6948
2022-04-26 13:51:08.570 11144-12723/? E/pragnesh: time 0.0 qx 0.0 qy 0.0 qz 0.0 qw 0.0 x 0.0 y 0.0 z 0.0
2022-04-26 13:51:08.570 11144-12723/? E/pragnesh: status -1
2022-04-26 13:51:08.587 11144-12723/? E/pragnesh: focalLengthX 484.068 focalLengthY 483.6075 principalPointX 317.23218 principalPointY 241.6948
2022-04-26 13:51:08.588 11144-12723/? E/pragnesh: time 0.0 qx 0.0 qy 0.0 qz 0.0 qw 0.0 x 0.0 y 0.0 z 0.0
2022-04-26 13:51:08.588 11144-12723/? E/pragnesh: status -1

@pragnesh1234 pragnesh1234 changed the title Tracking not Initialize, Every time pos gets null every time with all flavor. Tracking not Initialize, Every time Pose gets null every time with all flavor. Apr 26, 2022
@oseiskar
Copy link
Collaborator

See #46 . This repository does provides a framework for testing custom VIO implementations, but does not include any such custom implementations by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants