Problem with Rover control with Joystick and QGC

Hello,
First of all, apologies if the question is not placed in the correct sub-forum, as it is a problem that I believe involves both PX4 and QGC, I thought this would be the correct sub-forum.

I’m building a Rover and I’m testing PX4, but I’ve encountered a problem trying to make it work with a joystick and I don’t know how to solve it. Despite the joystick is detected correctly, when I try to move the robot with the joystick sticks the motors don’t move. The actions assigned to the joystick buttons do work.

Next I detail a little bit the components and the steps I have taken so far, in case someone can give me a hand.

Board: Pixhawk 1 (currently connected to the PC using the USB port)
Joystick: Logitech F710 (tried both DirectInput and XInput modes)
ESC: 2x Dual Brushed Motor ESC connected to pins MAIN 1 and MAIN 3
Frame: Differential Rover

The steps I have followed so far are as follows:

  1. From QGroundControl (v5.0.2) I have flashed PX4 1.15.4.
  2. In the Vehicle Setup > Airframe I select Rover Differential
  3. I performed the calibration of the sensors
  4. In the Motors tab, the first thing that strikes me is that although I have previously selected the Airframe Rover Differential, it shows me the configuration for a Rover Ackermann. At this point, no matter how many times I select in the Airframe tab the Rover Differential option and restart Pixhawk, it always shows me Rover Ackermann in the Motors tab. Doing some research in the parameters, I found the parameter CA_AIRFRAME, which was set as “Rover (Ackermann)”. By changing it to “Rover (Differential)”, the Motors tab already showed the correct information and I was able to set the ESC of the right side motors in MAIN 1 output as “Right Motor” and the ESC of the left side motors in MAIN 3 as “Left Motor”. I also configured the Min, Max and Trim values. At this point, in the Motor Testing section I can move the motors using the Sliders correctly.
  5. With all this, we come to the Joystick part. In Vehicle Setup > Joystick I click on “Enable joystick input” and I make sure that the joystick is selected in the drop-down menu. I try to move the joystick sticks and I see how all the Roll, Pitch, Yaw and Throttle sliders move according to the sticks (I have done the calibration process as well but it didn’t solve the problem). In Button Assignment I assign the Arm function to button 1 and the Disarm function to button 2.
  6. With all this configured, I close the Vehicle Setup screen and press button 1 on the joystick to arm the Rover, which arms without any problems. I make sure I am in “Manual” mode and when I move the Joystick sticks, nothing moves. The motors remain still. I try arming and disarming the Rover using the joystick buttons and the actions are executed without problems, so I rule out that it is a communication problem with the joystick.

At this point I’m a bit lost and I don’t know where to go, I’ve tried to change the RC_Mapping parameter settings, but nothing has changed, am I overlooking some configuration screen where I have to assign the Throttle and Yaw functions to the Joystick sticks?

Thank you very much

Hi @angellm,
When working with a rover I would recommend you to build PX4 directly from the main branch since rover support has been entirely reworked since v1.15.4. To do this you can follow the rover user guide.
If the problem persists, I am happy to further help you with the setup.

Hi, thanks for your reply.
I have followed the steps in the manual, compiling the firmware for the px4_fmu-v2_rover. I have also done it for the px4_fmu-v2_default adding the line CONFIG_MODULES_ROVER_DIFFERENTIAL=y, as they say in the manual. In both cases, I have not been able to solve the problem.
I have also tried with the px4_fmu-v3_default adding the line CONFIG_MODULES_ROVER_DIFFERENTIAL=y, but the problem persists.

I have been testing by changing the frame type and when I set it to Rover Ackermann and set the right motors to Steering and the left motors to Throttle, I am able to move them with the joystick levers, but as soon as I go back to the Rover Differential frame and set the motors to “Left Motor” and “Right Motor” the joystick levers don’t move anything. It is as if the Throttle and steering value is not translated to the movement of the left and right motors…

Alright, I looked into it a bit more and you actually came across a very specific issue:
Due to flash constraints certain airframes (like the differential rover one that you are trying to use) are excluded from being built for certain boards (including your v2 board).

This is what you can do to fix it:

  1. In the file PX4-Autopilot/ROMFS/px4fmu_common/init.d/airframes/50000_generic_rover_differential remove the line # @board px4_fmu-v2 exclude.
  2. In boards/px4/fmu-v2/rover.px4board remove the line CONFIG_MODULES_ROVER_POS_CONTROL=y and replace it with CONFIG_MODULES_ROVER_DIFFERENTIAL=y.

Then compile the firmware for px4_fmu-v2_rover and flash it onto your flightcontroller.

Thank you for bringing up this issue and let me know if this solution works for you!
I will implement a proper fix for this s.t. you can just build px4_fmu-v2_rover without having to do any of these manual changes.

1 Like

Thank you very much! I have done what you told me and I can now control the motors perfectly :smiley:

The truth is that seeing what had to be changed, it was certainly not something that I could reach on my own, I greatly appreciate the time you have taken to solve this particular problem :slight_smile:

You’re welcome, glad it worked out!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.