Hi, I am trying to figure out how to drive a PX4 ackermann rover in reverse. I am running the following setup:
Computer with a joystick input - ethernet - CUAV V6X flight controller (running the rover build 1.17 for CUAV V6X downloaded from PX4 github) - CAN - VESC omega
When I however enable “joystick - center stick is zero throttle”, “joystick - allow negative thrust”, “actuators - advanced - bidirectional” and “CA_R_REV = 4095”, the car drives forward just fine but in reverse it drives forward at a constant speed.
The only thing I found regarding this topic is an old github thread:
Yes it is available, but with a DroneCAN VESC the important part is making sure the VESC is actually receiving a negative command. Your symptom, reverse input producing a constant forward speed, sounds more like a sign/scaling or VESC configuration issue than the joystick itself. I’d first monitor the actuator/DroneCAN output while moving the stick through forward, neutral and reverse. If PX4 is producing negative thrust correctly but the VESC still drives forward, check the VESC’s direction/bidirectional configuration and firmware. Also make sure CA_R_REV isn’t simply being used as a workaround for a mismatch in the actuator configuration.
Hi, thanks for the reply. I had verified that the problem is indeed in the flight controller.
I connected a USB2CAN converted in the middle between the flight controlled and used DroneCAN GUI tool for analysis of the communication. I identifies the throttle commands from the flight controller called: uavcan.equipment.esc.RawCommand.
When I click on them, the tool tells me what it contains, here are the following for different joystick positions (center stick is zero throttle and allow negative thrust enabled):
Cmd: [0, 0, 1, 1] - null state, joystick in default position
Cmd: [0, 0, 213, 213] - throttle roughly in the middle of positive
Cmd: [0, 0, 999, 999] - throttle max positive
Cmd: [0, 0, 500, 500] - throttle roughly in the middle negative
Cmd: [0, 0, 500, 500] - throttle max negative
I had attached screenshot for further help. By the way checking the bidirectional checkbox does not change anything.