Maximum angular velocity

Post Reply
fnevgeny
Posts: 2
Joined: Thu May 03, 2018 1:56 pm

Maximum angular velocity

Post by fnevgeny »

Hello,

It seems there is a limit of the angular velocity, specifically, 100 rad/s. Using applyExternalTorque(), the angular velocity at first increases correctly but then is capped once 100 is reached. Alternatively, I can set a value directly with resetBaseVelocity - which at first glance works fine (getBaseVelocity returns the same vector), but de facto physics corresponds to 100 rad/s again, as is seen both in the visualization and actual interactions, e.g., of the rotating body with a surface.

I haven't found any mention of this in the docs - nor a way to raise this limit. Any pointers?

Thanks,
Evgeny
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Maximum angular velocity

Post by Erwin Coumans »

You can override the maximum angular velocity using btMultiBody::setMaxCoordinateVelocity

This maximum velocity is a safety mechanism, to avoid energies going to infinity.

What are you trying to achieve with a very high velocity?
fnevgeny
Posts: 2
Joined: Thu May 03, 2018 1:56 pm

Re: Maximum angular velocity

Post by fnevgeny »

Thanks for the quick response!
Erwin Coumans wrote: Thu May 03, 2018 2:52 pm You can override the maximum angular velocity using btMultiBody::setMaxCoordinateVelocity
It seems there is no equivalent in the Python binding (I've just started playing with pybullet to have a quick idea whether the library would be useful to me; will switch to C soon).
What are you trying to achieve with a very high velocity?
To simulate the table tennis ball dynamics (want to understand from the first principles why I play so badly :)). 100/(2*pi) ~= 16 RPS is actually rather limiting for modelling of practically any ball-based game. Maybe a warning should be printed when the clamping occurs; I spent some time tinkering with ball spin until realized the unexpected ball dynamics is due to some artificial limit.
Nanospin
Posts: 2
Joined: Wed Sep 04, 2019 6:57 pm

Re: Maximum angular velocity

Post by Nanospin »

Hi Erwin

Is there a solution in pybullet to set this max coordinate velocity that you indicates ?

I am trying to connect my flight simulation (in python) with pybullet. I use "apply force / torque" functions to let the airplane move.
Airplanes or rockets can go faster than 100 m/s so I experiencing the linear and angular max velocities limitation.
I think to scale down the speed using another unit for instance but I don't know yet how to do that easily.

Bonus question: centre of mass is moving during the simulation as the fuel is consumed. I know how to shift CoM before the simulation starts with createMultibody, but how to do it during the simulation ?

Thanks a lot for your help
deore
Posts: 1
Joined: Wed Nov 20, 2019 1:33 am

Re: Maximum angular velocity

Post by deore »

Hi, by default maximum joint velocity is limited to 100.0 rad/sec for continuous revolute joint, you can cange it with value you need

Code: Select all

p.changeDynamics(your_Body,	Joint_ID,	maxJointVelocity=10000)

hope this helps
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Maximum angular velocity

Post by Erwin Coumans »

>> I know how to shift CoM before the simulation starts with createMultibody, but how to do it during the simulation

I recommend to create an additional link (without visual shape, but with some collision shape) along a slider joint, and move that link. You can change the mass of that link using pybullet.changeDynamics.
Post Reply