Hi,
I would like to add a force sensor in order to link two models using the JAVA API. Is that possible? The only way that I found is to save a force sensor as a model. Then, I can load it. Is there another solution?
Cheers!
How can I add a force sensor using the remote API?
Re: How can I add a force sensor using the remote API?
Hello,
the solution loading a model is not elegant. You could do following instead:
on the V-REP side, you could have a dummy with a non-threaded child script attached, that reads a specific signal (e.g. a string signal). If the string signal has a specific code, then the child script will create a torque/force sensor, and send back its handle. In that case, the child script could be seen as a server that executs higher-level tasks for the remote API client. Such an example is available in the programming/remoteApiBindings folder, for each language (check complexCommandTest, which will create a dummy instead of a force/torque sensor).
Cheers
the solution loading a model is not elegant. You could do following instead:
on the V-REP side, you could have a dummy with a non-threaded child script attached, that reads a specific signal (e.g. a string signal). If the string signal has a specific code, then the child script will create a torque/force sensor, and send back its handle. In that case, the child script could be seen as a server that executs higher-level tasks for the remote API client. Such an example is available in the programming/remoteApiBindings folder, for each language (check complexCommandTest, which will create a dummy instead of a force/torque sensor).
Cheers