Copter-4.0 Sitl Failed to load module joystick

Ubuntu 18.04
Copter-4.0.0

I try to use RC radio (Taranis X9D) in sitl, with joystick mode. Here is my procedure:

  • cd ArduCopter

  • sim_vehicle.py --console --map

  • module load joystick

and i get response like this:

STABILIZE> module load joystick
STABILIZE> Failed to load module: No module named joystick. Use ‘set moddebug 3’ in the MAVProxy console to enable traceback

Anyone meet this ?
before this, i run code Copter-3.6.0, module load joystick is ok, or Copter-4.0 just work different way?

Thanks for help.

No, the joystick is a MavProxy Module. Not an Ardupilot module. Therefore it makes no difference if you are running Copter 3.6 or Copter 4.0.

The MavProxy version that you use does however make a difference :slight_smile:

1 Like

Thanks for reply, the problem solved.
i need install pygame and pyyaml,

pip install pygame
pip install pyyaml

After do this , porblem solved, it work perfectly.

1 Like

Quite old post, but problem is not solved for everybody.
I am using arducopter (4.5 dev) directly, no python, it works on Windows but not on Linux.
So , if source code is the same, problem is not related to python, generally speaking.
Case above is if You use python.
Anyway, i guess the solution is not so far from being totally found, because it is a very repetible common problem, that under linux joystick shows in planners GCSs , but it is not recognized by arducopter itself.

Alfredo

HI,
I found a way to put joystick into work on LInux Ubuntu skipping sim_vehicle.py :

Arducopter (SITL) must be compiled with sfml configured.
The following works (giving command line commands from ardupilot local dir):
./waf configure --board sitl --sitl-osd --enable-sfml --enable-sfml-joystick.
(I use also OSD, I had no time to test with no OSD, skippping --sitl-osd should work).

Warning:
there are some quirk priorities in #define allocations while configuring SITL.
if You use only
–enable-sfml-joystick,
without --enable-sfml,
the resulting linux binary does not recognize joystick and sfml is declared not found. This is a topic for another discussion thread (likely an issue/bug).

Alfredo