Page 1 of 1

Prismatic joint with velocity 0 doesn't hold position.

Posted: 25 Mar 2024, 17:03
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

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

Posted: 26 Mar 2024, 14:18
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

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

Posted: 26 Mar 2024, 19:00
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?

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

Posted: 27 Mar 2024, 09:54
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