I have been trying to add a 5KN force on the solid node named 'LLarm' on a robot in Webots from a matlab code using this function:
void wb_supervisor_node_add_force('LLarm', 5000, true)
but i get this error: Undefined function 'void' for input arguments of type 'char'. Error in atlas_matlab (line 12) void wb_supervisor_node_add_force('LLarm', 5000, true) Error in launcher (line 161) eval(WEBOTS_CONTROLLER_NAME);
The force is described as a 3-dimensional vector, along the X, Y, and Z axes, see here:
https://cyberbotics.com/doc/reference/supervisor?tab-language=matlab#wb_supervisor_node_add_force
You have to get a reference to the Solid node, see here:
https://cyberbotics.com/doc/reference/supervisor?tab-language=matlab#wb_supervisor_node_get_from_def
Finally, your code should look something like this: