Best way to manage fast model updating

I’m building a SLAM like environment for a robotics application using Panda3D.

Right now, I’m drawing people from a streaming camera datastream into the Panda environment. I’m grabbing the people objects, and creating an instance of a person.bam, and loading it into the render node. It happens about 5 - 15 times per second.

However, the people are beginning to add up, because I don’t delete them yet. I’m thinking about adding the model instances to a node, and then deleting that node after every update in a task manager. Is that the most efficient way of doing this?

There doesn’t seem to be an API documentation that has all the methods listed out, so I’m not sure what’s available. Is there a location for them yet besides the Sphinx docs here:

There’s the API, located here:

(I don’t have an answer for your primary question, I fear, so I intend to leave that for others.)

1 Like

Thanks for that!

I’m looking at the Asteroids example, which I think might be a good way to handle this kind of system.

I think the main difference is that I couldn’t just update existing lists since the number of people would come and go over time, unlike Asteroids which are set at game initialization. So, in Asteroids, how would you delete all the Asteroids from the render tree and then add all new ones in?

It’s been tough to find a 3D engine with Python that is easy to code streaming data into, so I’m optimistic about the Panda3D setup.

So, I used the asteroids example as a base, and it worked for the most part. Not ideal, since I’ll have to add some kind of Kalman filter for noisy data, but it works for now.

Thanks Panda3D team!

1 Like