ArduSub 4.7.1: Internal errors 0x400 cnstring_nan when moving camera tilt servo

Hello,

I am troubleshooting a BlueROV2 with a Navigator autopilot and I have found a reproducible problem when controlling the camera tilt servo.

Hardware

  • BlueROV2
  • Navigator autopilot
  • Raspberry Pi 4
  • Camera tilt servo connected to Navigator SERVO16
  • QGroundControl 5.1.4
  • ArduSub 4.7.1 STABLE
  • BlueOS: BlueOS Version: tags/1.4.6-0-g9b9e1643
  • Windows PC
  • Camera tilt controlled using a joystick through QGroundControl

Problem

When MNT1_TYPE is set to None, everything works normally.

When I configure:

MNT1_TYPE = Servo
SERVO16_FUNCTION = Mount1Pitch
RC8_OPTION = Mount1 Pitch
MNT2_TYPE = None

the camera servo does not physically move.

If I move the camera tilt control, QGroundControl reports:

PreArm: Internal errors 0x400 l:1037 cnstring_nan

The error is reproducible.

The important point is that the error appears when I move the camera tilt control. It does not appear simply by setting MNT1_TYPE = Servo.

Current MNT1 configuration

MNT1_TYPE        = Servo
MNT1_DEFLT_MODE  = Neutral
MNT1_RC_RATE     = 30 deg/s

MNT1_PITCH_MIN   = -90 deg
MNT1_PITCH_MAX   = 20 deg

MNT1_ROLL_MIN    = -30 deg
MNT1_ROLL_MAX    = 30 deg

MNT1_YAW_MIN     = -180 deg
MNT1_YAW_MAX     = 180 deg

MNT1_NEUTRAL_X   = 0 deg
MNT1_NEUTRAL_Y   = 0 deg
MNT1_NEUTRAL_Z   = 0 deg

MNT1_OPTIONS     = 0
MNT1_SYSID_DFLT  = 0

MNT2_TYPE        = None

Servo output configuration

SERVO16_FUNCTION = Mount1Pitch
SERVO16_MIN      = 1100
SERVO16_TRIM     = 1500
SERVO16_MAX      = 1900

QGroundControl shows that SERVO16 is receiving a command. For example, when moving the camera control I observed SERVO16 at approximately 1582 PWM.

However, the physical servo does not move.

RC configuration

RC7_OPTION = Mount1 Yaw
RC8_OPTION = Mount1 Pitch

The camera only uses pitch; there is no physical yaw camera servo.

Important observation

The error disappears when:

MNT1_TYPE = None

and reappears when:

MNT1_TYPE = Servo

and I move the camera control.

I have also confirmed that the error is not caused by the physical servo being connected or disconnected. The behavior can be reproduced with the servo disconnected.

Firmware/output-function question

There is another detail I would like to clarify.

The current Blue Robotics documentation for the BlueROV2 refers to the camera tilt output as MountTilt, but in my QGroundControl installation with ArduSub 4.7.1, MountTilt is not available in the SERVO16_FUNCTION dropdown.

The available function is:

Mount1Pitch

which is what I am currently using.

I found a Blue Robotics forum post where SERVO16_FUNCTION = Mount1Pitch (7) and MNT1_TYPE = Servo (1) are recommended for a Navigator camera tilt servo, so I believe this configuration should be valid.

Questions

Could someone from Blue Robotics/ArduSub help determine:

  1. What does cnstring_nan at line 1037 indicate in this situation?
  2. Is this a known issue with ArduSub 4.7.1 / AP_Mount / RC camera control?
  3. Is SERVO16_FUNCTION = Mount1Pitch the correct configuration for Navigator + camera tilt on ArduSub 4.7.1?
  4. Why would moving the RC8/Mount1 Pitch input cause an internal NaN condition?
  5. Would an ArduPilot .BIN log help identify the source of the NaN?

I can provide the full autopilot parameter file, screenshots, and a .BIN log from a reproduction of the error.

Thank you.