Page 1 of 1

Error in getJointForce method

Posted: 01 Jun 2024, 06:08
by Juancho
Hi there!

I'm having issues when using the method getJointForce in Matlab using the ZeroMQ remote API.
I'm running CoppeliaSim v4.6.0-rev18 arm on a MacBook Air M1. I am using the matlab files from the GitHub repository (https://github.com/CoppeliaRobotics/zmq ... ree/master) but using the branch coppeliasim-v4.6.0-rev18.
When I use the C++ client, everything works.

Minimal example:
(There is a Franka Emika Panda robot on the scene)

Code: Select all

client = RemoteAPIClient();
sim = client.require('sim');

sim.startSimulation();

handle = sim.getObject("/Franka/joint");
tau = sim.getJointForce(handle);

sim.stopSimulation();
Output:

Code: Select all

Output argument "varargout{1}" (and possibly others) not assigned a value in the execution with
"RemoteAPIObject/subsref" function.

Error in minimal_example (line 11)
tau = sim.getJointForce(handle)
I appreciate your help. Thanks!

Best regards,

Juan

Re: Error in getJointForce method

Posted: 01 Jun 2024, 07:45
by fferri
Fixed in V4.7:

https://forum.coppeliarobotics.com/view ... 619#p40619

Meanwhile, to avoid this error, don't read the force in the first simulation step.

Re: Error in getJointForce method

Posted: 01 Jun 2024, 14:50
by Juancho
Thanks a lot!