AREA file from ZEDfu Application

I’m using the ZED camera for spatial mapping purposes and I’ve written code for such and I need to extract the AREA file for Positional Tracking improvements. I’m able to do so and know how to load in the AREA file to ROS etc, and it localises pretty well.

However, meshing using Python is extremely slow, doesn’t turn out with the best mesh, and requires a lot of time. Using the ZEDfu application is much, much faster, produces a much better mesh, and is a much more seamless process to produce a mesh. But I don’t know how to extract the AREA file using the application. I know there is a “Positional-tracking area memory” enable button, which I thought would give me the AREA file but it doesn’t.

My question is, how do I get an AREA file either using the ZEDfu application, or by using the generated mesh somehow to create it?

Hi, @lukec1997, welcome to the forums.

It’s not possible to save the .area from ZEDfu in its current version, but that’s a good idea for improvement, I’ll add it to our backlog.
It’s not possible to generate it from a mesh either, it’s linked to the positional tracking itself.
If you’re having performance issues with the Python integration, would you be able to check if they are lessened by using the C++ integration?

As for the quality of the generated mesh, if you use the same settings in the Python script as the ones in ZEDfu, you should have the exact same mesh in the end, there are not any parameters in ZEDfu not available in the SDK/python integration. I advise you to save an SVO and do your tests and adjustments on it.

Hi @JPlou, thank you for the welcome and your reply.

Okay, do you think this will be added in future versions?

Yes, that’s how I’m saving the .area file, when disabling the positional tracking. Okay I will try get it to work using C++ code provided. I have noticed that with the ZEDfu application that it uses 80%+ of my GPU while with the Python code it uses no more than 40%. This could be causing it also. Is there a way of forcing the ZED to use up more of the GPU in the code?

Okay, I will go ahead and test with this, try to optimise it a bit more, I feel C++ will work better.

Let us know how it goes with C++!

It will probably be added in ZEDfu at some point, but I’m sorry to say it’s not a priority and it takes some time since GUI is involved, so I don’t want to get your hopes up on this.
It’s strange that Python would use fewer resources. Did you reproduce the exact same settings from the ZEDfu settings panel in your code?

I will. Okay, good to know though at least so I can work on this solution instead.

Yes I did but I had to change around a few things in the Python code as the code for spatial mapping with Python doesn’t work straight out of the box, the enabling of the spatial mapping and positional tracking is misplaced. I also added in a lot of my own code so that files would save in certain directories, positional tracking values of x, y, and z are saved, amongst more things. I will double check the parameters set from ZEDfu to the Python equivalent.

1 Like