Hi all,
I am using ZED2 SDK4.0 C++ for body tracking. I used to get the information for the joints using something like ( object.keypoint[index].y) and to get angles (object.local_orientation_per_joint[index].y ). However, I am seeing that the program crashes when I use anything besides (object.keypoint[index]).
I would like to note that things were fine in the previous version SDK 3.8.
Hi @feraskiki
the body tracking indices changed from SDK v3.8 to SDK v4.x according to the model that you are using.
Please check that they are correct.
Hi,
I payed attention to that. The problem here is that the whole program crashes. I used a small index as an example (17), and I don’t recall seeing such behavior before.
I have attached the file below, I only made changes to main.cpp. I am using the basic example file from body tracking. I can share the whole thing if necessary.
Maybe I am confusing something here. To clarify more, the problem occurs when I uncomment the line underneath (// problematic line). I agree that the camera needs to have tracked a body for sure. The problem is happening after the body is tracked.
The problem is specific to object.local_orientation_per_joint. Does it work fine for you?
I would like also to point out that model BODY_34 is also a problem and doesn’t work. All other models worked in general but not this. It used to be just a camera view without a skeleton, but now what I am seeing is that the program crashes. For example, BODY_38 or BODY_18 work fine on the same code
You should always check the size of a vector before accessing it by index.
In your case, the vector object.local_orientation_per_joint is empty because you did not enable the Body Fitting feature body_tracker_params.enable_body_fitting = false;.