vortexntnu / rov-control

Complete control system for Vortex' ROV
13 stars 9 forks source link

Setpoint issue / ROV "loose" depthhold in multiple axis controls #61

Closed olesot closed 6 years ago

olesot commented 6 years ago

The controller node should not call resetSetpoint() in headingHold and depthHold when they are not active.

  if (activate_headinghold)
  {
    ...
  }
  else
  {
    resetSetpoints();
    tau.setZero();
  }

This is a problem when the different controllers is combined; like in depth and heading hold control mode.

The controllers should only be able to change the setpoint of the state they are regulating. Eg. depthHold should only be able to change the heave setpoint.

Fixing this fixes the ROV "floating" away from its depth hold setpoint when we are changing the yaw state with control command from joystick.