Error in getJointForce method

Report crashes, strange behaviour, or apparent bugs
Post Reply
Juancho
Posts: 17
Joined: 11 Jun 2018, 03:14

Error in getJointForce method

Post 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

fferri
Posts: 1303
Joined: 09 Sep 2013, 19:28

Re: Error in getJointForce method

Post 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.

Juancho
Posts: 17
Joined: 11 Jun 2018, 03:14

Re: Error in getJointForce method

Post by Juancho »

Thanks a lot!

Post Reply