AION ROBOTICS - R1UGV (Ardupilot Edition) w/ Pixhawk 2.1 Black Cube + RoboClaw

Hi

I bought from the AION Robotics company a R1 UGV (Ardupilot Edition) that already comes with a Pixhawk 2.1 Black Cube (running ArduRover v4.1.0-dev), RoboClaw 2x15A ESC, here2 GPS and a power distribuition system to provide power to Pixhawk 2.1 and Roboclaw. All wire connections were all made by them but the most important for this situation are the connections between pixhawk and roboclaw:
Pixhawk ----------> RoboClaw
PWM1 --------> S1
PWM3 --------> S2
The only change we made was to remove the here2 GPS and place the ardusimple rtk2b for for better accuracy.

Now let me tell you about the problems I have been facing:

  1. For months everything seemed to be working well but suddenly it stopped working: we gave an order to walk forward for example and he started walking to the side or shaking and we can never understand the problem.
  2. Analyzing better the connections and configurations that came from the company AION Robotics, I noticed that Roboclaw was configured for analog mode and I started to wonder how that would be possible, since the Pixhawk has no DAC in order to be able to send analog signals. I also noticed that the pixhawk was set to MOT_PWM_TYPE = 3 (brushed mode).
  3. I tried to contact AION Robotics several times asking for a datasheet explaining their connections and the configurations they made on Roboclaw 2x15A and on Pixhawk and I never got an answer.
  4. For me the most obvious/correct configuration would be to use the RC Mode which is a fixed frequency PWM and whose pulse width controls the direction and speed of each pair of motor that is connected to the ESC Roboclaw. So I configured Roboclaw for RC mode, I developed a small code on the Arduino Mega just to test it and I managed to control the motors by sending a PWM to the S1 signal and another PWM for signal S2. Then I reconnected the Pixhawk to Roboclaw and changed the settings to MOT_PWM_TYPE = 0 (normal mode aka RC Mode) and I was able to control the robot.
  5. The GPS also stopped working on the GPS2 port and I changed it to the TELEM2 port since the order of pins VCC, TX, RX and GND is the same (and I made the changes
    needed in pixhawk settings) and it worked. Days later, the GPS on the TELEM2 port also stopped working. I changed again to TELEM1 and it worked. What is the problem?

Can anyone help? What is the best way to control the roboclaw 2x15A with the pixhawk in order to perform ground missions? RC mode or another mode? If in RC mode, what settings do I need to ensure on pixhawk? What about GPS, why has it stopped working? And why did the company IONRobotics sell the robot with Roboclaw ESC configured for analog mode?

Thanks in advance.

Can you share the log about this?

What do you mean by “the log about this” ? What links/files do you need?

The binary log generated by Ardupilot. Such that we can see whether the PWM output, GPS, etc were working normally.

logFiles_parametersFiles.zip (3.5 MB)

It looks like the mag was abnormal. This may make the rover unable to recognize its yaw position. Maybe this caused it walking to the side or shaking.
You may try to recalibrate the mag at the field, and calibrate after IMUs are warmed up.

For the MOT_PWM_TYPE problem, I think it determines whether motors can be reversed.
https://ardupilot.org/rover/docs/rover-motor-and-servo-configuration.html#motor-driver-types
https://ardupilot.org/rover/docs/parameters.html#mot-pwm-type

You will need to calibrate your RC every time after you have changed the setting, because the usage of PWM mid point would change.

For the GPS stopped working, you may try to connect external power to your GPS module. The port from Cube gives only a little power. It might be your GPS module didn’t get sufficient power.