Skip to content

How to get global pose of actors in different threads and an issue on api checkResults #283

Closed Answered by msauter-nvidia
SHiziw asked this question in Q&A
Discussion options

You must be logged in to vote

If you really want to keep them totally independent, then it seems to me that you can't avoid some sort of mutex or at least lock-free data structure to communicate the actor poses safely.
It would seem simpler if the reading thread called simulate() and fetchResults(). Note that the simulation will run on a separate thread that way, if you implement the PxCpuDispatcher interface with one worker thread (see PxSceneDesc::cpuDispatcher and the PxDefaultCpuDispatcher example). And by using checkResults(), the reader thread will only call fetchResults() once the simulation has finished, it will not get blocked otherwise. But I'm sure there is a good reason why you do not want to work with suc…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@SHiziw
Comment options

@msauter-nvidia
Comment options

@SHiziw
Comment options

@msauter-nvidia
Comment options

Answer selected by SHiziw
@SHiziw
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants