robotology / gazebo-yarp-plugins

Plugins to interface Gazebo with YARP.
33 stars 48 forks source link

Controlboard not robust against NaN torques #279

Open traversaro opened 7 years ago

traversaro commented 7 years ago

If the controlboard receives a NaN torque, the simulation explodes.

triccyx commented 6 years ago

As it is missing the code with problem from issue, I try with the two following methods from ITorqueControl:

virtual bool yarp::dev::ITorqueControl::setRefTorque (int j,double t ) virtual bool yarp::dev::ITorqueControl::setRefTorques (const double * t)

I can confirm that they suffer for this issue if nan is the parameter.

Tests done with: 1)nan from the nan() API --> KO 2)inf from division by zero -->OK 3)pointer to double instead of array -->OK