Prismatic joint with velocity 0 doesn't hold position.

Report crashes, strange behaviour, or apparent bugs
Post Reply
Exik0
Posts: 2
Joined: 25 Mar 2024, 15:43

Prismatic joint with velocity 0 doesn't hold position.

Post by Exik0 »

Hello, I need a little help from more experienced users.

My problem is, when i set by Lua code PRISMATIC joint target velocity to zero it still moves by preassure of weight (joint doesn't hold position). when i randomly change tree of connections problem is fixed and system works fine until i save the scene, close and open the scene again. Does anyone have a similar experience?
  • I have newest version of Coppelia Sim EDU 4.6.0.
  • Joint is in velocity mode (target velocity set to 0 and Max. force is set to 90kN)
  • I'm using bullet 2.78

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Prismatic joint with velocity 0 doesn't hold position.

Post by coppelia »

Hello, this is mostly a normal behaviour: a velocity controller is not a position controller. The controller will try to hold as well as possible the desired velocity, but won't correct for any positional slips obviously.

Make sure that your Max. force is large (relative to the exerted forces), as that will act like a large friction when the target velocity is zero.

Cheers

Exik0
Posts: 2
Joined: 25 Mar 2024, 15:43

Re: Prismatic joint with velocity 0 doesn't hold position.

Post by Exik0 »

Thank you for your answer.

So what should i use if i want control speed of joint by Lua code and need hold position when velocity is 0m/s? Can i set control mode of the joint to position and control the joint by velocity? I need the prismatic joint to simulate hydrailic cylinder. Any advise?

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Prismatic joint with velocity 0 doesn't hold position.

Post by coppelia »

For hydraulic cylinders, I'd use prismatic joints in position control mode.

If you need anything more fancy, then use a custom control mode, and write your own controller for that (via a joint callback function).

Cheers

Post Reply