Ask Your Question

multi-threading -> cholesky factorization error, rospy

asked 2014-08-13 10:14:06 -0600

holmes.kirby gravatar image

Hello All,

I have two callbacks within a class that share the same data in python. Is it possible that these callbacks are altering the data at the same time?

I am getting an error while trying to take the cholesky of a covariance matrix.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-08-13 10:52:30 -0600

Chrissi gravatar image

That is perfectly possible. Both run in different threads and might therefore write to the same variable while you're reading it. It must not even be both at the same time but if you are reading it outside the callback then the callback might write to it while reading.

Have a look at this to see how thread safety and locks work in python.

edit flag offensive delete link more


This looks perfect! Hopefully this turns out to be the problem.


holmes.kirby gravatar image holmes.kirby  ( 2014-08-13 11:23:49 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-08-13 10:14:06 -0600

Seen: 503 times

Last updated: Aug 13 '14