Joystick

Hi,

I’ve seen the possibility of controlling the drone with a joystick in APM Planner v2 (0.18). I’d like to know if there’s a possibility to control movements directly on the application (a kind of virtual joystick).

thanks for advices :slight_smile:

Yes, sure. Take a look at Dronekit and ROS. Both are preinstalled on new a Beta image that you can use.

I see Dronekit is for Android and ROS not for Windows. Is there Something for a basic Windows user?

Julien,

An application like you described is not straightforward. That’s why some experience in Linux and programming might be essential. I suggest reading up on these topics before trying to tackle the problem. Either way, you should read the following docs before pursuing your goals.

I understand for Windows the common joystick might be the easiest solution. Thank you for your suggetions.

@Julien_768 Take a look at the beta QGroundControl branches on GitHub, their currently working on a full GCS that can run on iOS and Android I believe. Including virtual joystick control and video!

I’m trying a usb Logitech gamepad on QGroundControl. I’m able to go through the calibration but can not use it. The following error message is displayed. Does the Navio2 firmware have the MAVLink MANUAL_CONTROL support?

To be more precise, I’ve tried 3 ground stations on Windows Mission Planner, APM v2, QGroundControl and Android QGroundControl. In rover, I’ve set Roll on CH2 and Throttle on CH1. Joystick is plug by usb wire.

On Mission Planner, Joystick is barely working. Roll CH2 can be match to Roll gamepad axis but Throttle CH1 is activated by Rudder gamepad axis. Furthermore, pushing the enable / disable button on Mission Planner make the gamepad controls not working anymore. The Save button is not working neither, nothing is stored in memory.

On QGroundControl, I can go through calibration but it has absolutly no effect on the motors, and there is the error message (previous post).

On the Android QGroundControl, i’ve got the error message (previous post).

On APM v2, I can see the axis moving in the joystick Windows, but clicking on the enable or disable button has absolutly no effect.

Do this problems come from the ardurover firmware? Should mapping parameters of the gamepad and axis be recorded in the full parameters list normally?

Hmm I do know that others have used a joystick over telemetry from 3g/4g. So it should work, I believe they used mission planner or apm planner I do not remember right now. Here is a quick link I found from @ogulbrandsen who has done many builds that seem to be controlled from a joystick. Maybe he can help?

It’d be great to get this to work since I recall there aren’t any guides on the forum on how to do this exactly. Also, I was planning on using a joystick for control as soon as I get a battery for my quad.

In terms of the error message, it is more of a disclaimer than an error message. This being said i’d assume it is enabled since people have got it to work before, though I’m not positive.

Two things you should checkout anyways are this link:

https://pixhawk.org/users/joystick

Also, did you calibrate your ESC appropriately?
If you have not calibrated them there is something about changing your RC values in a GCS though I cannot find any links atm. You may also need to calibrate them directly (e.g. program in BlHeli configurator).

@Julien_768 Under Windows you need to first calibrate the joystick in the windows driver utility. Just hit the start button and start typing “joystick”. Should come up with “Set up USB game controllers”. Make sure it is working in there and calibrate it. That utility will also help you understand axis and button mappings. Save.

Then in Mission Planner you need go to joystick screen, enable it, and map the axis and buttons you want to use. Save. You will need to enable it at each start, but it should save your mappings.

I have not tried any other GCS software.

Note, I only use a USB joystick for our ground rovers. Left stick fwd/rev and right stick left/right turn. There is much more latency using joysticks. It could work for a well tuned quad but i would not start out with a joystick. Use RC control until you know the quad is flying the way it should because a USB joystick is really going to feel like a suggestion as to which way to fly compared to RC.

The other issue you need to watch is both of your sticks on a USB joystick are spring loaded to center. Not sure how you want to address minimum throttle on a stick that is spring loaded to center. I know the APM devs were working on ways around this limit but have no idea where it stands today. So unless you want to arm in alt hold or loiter this may be an issue.

I hope to be doing more tests with joystick over the next few months and will let you know if I find anything exciting.

Try to use the latest Missionplanner beta. I had issues with MP not saving joystick settings too.
The axis naming in the joystick screen will most likely not be what your vehicle requires. For my rover throttle is throttle, but steering is pitch, for example. Regarding lag and spring loaded throttle, I would only use “assisted” flightmodes like loiter or poshold with a joystick and a flying vehicle. Given that all setup and tuning is done with RC first. For a rover or boat the lag does not matter that much and my wifi controlled rover has not much lag at all.

I’ve found out how to save joystick settings on mission planner, there’s a bug, the Auto Detect button is not fully working.

Also, Pitch and Throttle are inverted and are not corresponding to the mapping made in the RCMAP parameters.

Joystick in latest MP beta works but still seems a bit buggy when using auto detect. See link above. Got it to work but stuck with manual select of all axis and buttons to ensure proper save.

Also noted that running the RC calibration routine with the gamepad fixed an issue with throttle being reversed when running auto missions and allowed me to use trigger for ch7 Learning modes waypoint save. This was all with latest Rover firmware on a robot that is only using a gamepad controller. Personally would not trust joystick only for anything that flies until well tested.