raisimTech / raisimLib

Visit www.raisim.com
http://www.raisim.com
Other
341 stars 91 forks source link

question about raisimGyrm's vecEnv and OSQP library compatibility #456

Closed sizsJEon closed 1 year ago

sizsJEon commented 1 year ago

When I use osqp to solve problems in raisimGymEnv in a parallel environment, it works well when num_env is set to 1,

but when num_env is set to 2 or more, osqp is not working properly and I'm experiencing strange behavior. (I have abnormal behavior of the robot in raisim ui program).

I thought that each env(Environment.hpp) in vecEnv had a separate memory area, bu it turns out to be there are some problem here.

for double check, I also checked that both osqp work well when running raisim osqp + gazebo osqp programs separately.

Can you give me some advice on what to do to solve this problem?

development environment: raisim 1.1.5 osqp 0.6.2

p.s I'm trying to solve it with mkl library support of osqp, but stucked in it.

jhwangbo commented 1 year ago

You have to check if OSQP supports multi-threading. It might have global variables or use thread-unsafe libraries. Because it is not about raisim, I'll close this issue.