## Add a way to read joint maximum force

Requests or suggestions for new features
Adrian
Posts: 12
Joined: 22 Jun 2018, 23:03
Contact:

### Add a way to read joint maximum force

Hi,

If I'm informed correctly, there is currently a way to set the "Maximum Force" of a dynamic joint using function sim.setJointForce, but no way to read the value of said parameter. There is only a way to read the "Current Force" applied to a joint using sim.getJointForce.

It would be nice to have a getter for the Maximum Force as well. It looks like almost all other dynamic parameters for joints have a Object Parameter ID already, except for the Maximum Force.

I guess it might be worth considering to add a new parameter ID (e.g. sim.jointfloatparam_maximum_force) or a new getter function (e.g. sim.getJointMaximumForce()).

For my specific project, this would make it easier to monitor the status of multiple joint controllers and check whether the maximum force was reached or not.

Best,
Adrian

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

### Re: Add a way to read joint maximum force

Hi Adrian,

I agree. In next release you'll have following two API functions:

sim.setJointMaxForce
sim.getJointMaxForce

while sim.setJointForce will be deprecated (but still functional), to avoid confusion or any relation with sim.getJointForce.

In the mean time, as a workaround, you could implement a script function that buffers the joints max. forces, when setting them, and another function that retrieves values from that, when getting them.

Cheers

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

### Re: Add a way to read joint maximum force

CoppeliaSim V4.0.0.rev4 is out, and includes mentioned changes.

Cheers

Adrian
Posts: 12
Joined: 22 Jun 2018, 23:03
Contact:

### Re: Add a way to read joint maximum force

Very nice! Thank you!