bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.36k stars 2.85k forks source link

Using pybullet inside casadi for dynamics computation #4287

Closed prakrutk closed 1 year ago

prakrutk commented 2 years ago

I am trying to use pybullet inside casadi for computing the next states but it gives a segmentation fault as I try to pass optimization variable (force value and the coordinates where force is to be applied) inside pybullet.applyExternalForce.

I am not sure but I guess it is because casadi uses a symbolic framework and I cannot pass symbols in a pybullet function. If any one has a clearer idea on why this is happening and is there any way to get this working please do let me know.

Thanks.

YechenZhou commented 1 year ago

Have you solved this problem yet? I have the same problem as you. @prakrutk

prakrutk commented 1 year ago

I guess it is mostly due to the symbolic framework while pybullet does not take in symbolic variables in the function. I did not find any solution I used another physics engine in place of this to make it work.

jcarpent commented 1 year ago

Depending on your applications, you may use Pinocchio for that (https://github.com/stack-of-tasks/pinocchio/).

YechenZhou commented 1 year ago

I guess it is mostly due to the symbolic framework while pybullet does not take in symbolic variables in the function. I did not find any solution I used another physics engine in place of this to make it work. Can you tell me what physics engine you used afterwards? @prakrutk

prakrutk commented 1 year ago

I guess it is mostly due to the symbolic framework while pybullet does not take in symbolic variables in the function. I did not find any solution I used another physics engine in place of this to make it work. Can you tell me what physics engine you used afterwards? @prakrutk

I used Mujoco for my application. But it depends on what you are using it for.

YechenZhou commented 1 year ago

I guess it is mostly due to the symbolic framework while pybullet does not take in symbolic variables in the function. I did not find any solution I used another physics engine in place of this to make it work. Can you tell me what physics engine you used afterwards? @prakrutk

I used Mujoco for my application. But it depends on what you are using it for.

Thanks. Can Mujoco work inside casadi? @prakrutk