Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modules on Raspberry Pi #50

Closed
unphased opened this issue Apr 27, 2014 · 13 comments
Closed

Modules on Raspberry Pi #50

unphased opened this issue Apr 27, 2014 · 13 comments

Comments

@unphased
Copy link

I have tried installing MAVProxy with pip and with the python setup.py build && python setup.py install and I only get this list:

STABILIZE> module list
STABILIZE> log: log transfer
wp: waypoint handling
rally: rally point control
fence: geo-fence management
param: parameter handling
relay: relay handling
tuneopt: tuneopt command handling
arm: arm/disarm handling
mode: mode handling
calibration: calibration handling
rc: rc command handling
auxopt: auxopt command handling

STABILIZE> module load map
STABILIZE> Failed to load module: No module named map

It's like this whether i call the one in the build directory, the one in the source directory, or the one in the install directory /usr/local/bin.

Is this expected? I was sort of hoping I can get the modules like map and console and whatever else to work when x is running on the raspberry pi. Also, it's not very clear at all how modules work, how they're loaded, and how I can make a new module.

@rmackay9
Copy link
Contributor

Unphased,
you've followed all the instructions on this page of course? http://dev.ardupilot.com/wiki/raspberry-pi-via-mavlink/

@rmackay9
Copy link
Contributor

I know that sitl requires the map, maybe there are some additional packages listed here?
http://dev.ardupilot.com/wiki/setting-up-sitl-on-linux/

@unphased
Copy link
Author

Yes I have followed the instructions. Everything listed in that tutorial works fine, but it does not touch upon the GUI related stuff.

I don't need any of the GUI stuff, but I want to test it. So, it is not helpful that all I get is Failed to load module: No module named map. Can you tell me what the next step is in finding out what happened to these modules?

@vmayoral
Copy link

@unphased I believe the modules are programmed for Desktop Linux (@rmackay9 correct me if i'm mistaken please). I also tried it in the BeagleBone (running a Ubuntu FS) and in OS X.The modules are not loadable.

If you wish to get something specific you probably need to implement a module for the Rpi.

@unphased
Copy link
Author

I'm not using mavlink anymore, but thanks for the clarification.

@asuhler
Copy link

asuhler commented Aug 31, 2014

I have a similar problem with a module I developed. It works perfectly in Ubuntu desktop, but it will not load on a raspberry pi. I have confirmed that the module is in the correct directory and that all the dependencies are installed, but I cannot get even a simple script that prints "hi" whenever telemetry data is received to load. I receive the following error:

module list
STABILIZE> log: log transfer
param: parameter handling
relay: relay handling
tuneopt: tuneopt command handling
arm: arm/disarm handling
mode: mode handling
calibration: calibration handling
rc: rc command handling
auxopt: auxopt command handling
misc: misc commands
cmdlong: cmdlong handling
battery: battery commands
output: output control

module load rabbit
STABILIZE> Failed to load module: No module named rabbit

I have confirmed that the command above works on my Ubuntu desktop. I am unable to find any differences between the imported libraries and code structure of my code vs the code of modules that do load on the pi, i.e. "mavlink_battery.py". I actually copied the code from "mavlink_battery.py" and just modified it for my purposes. Is there any known reason why it would be unable to find/load a module specifically on a Raspberry Pi? Any suggestions as to how I should go about fixing it? Thanks!

@asuhler
Copy link

asuhler commented Sep 2, 2014

I have an update: There's something different about the python environment, more specifically the libraries, on the pi's vs desktop. Any non-standard library that is installed, even when installed using easy_install or pip, doesn't seem to show in the eyes of the module manager. Commenting out all non-standard libraries results in the module loading correctly on the pi's. The ubuntu installs do not seem to be effected by this problem at all. I'll keep trying to isolate the problem.

@gitkosala
Copy link

Hi @asuhler , Did you find that solution ? I got the same problem. I can't load my module, even when I try another module like mavproxy_antenna.py.

@tridge
Copy link
Contributor

tridge commented Oct 5, 2014

It is almost certainly because of missing base python modules.
Try "set moddebug 2" then "load module antenna" and see what it says

@asuhler
Copy link

asuhler commented Oct 6, 2014

@gitkosala @tridge
The problem was in fact a python module. I have no idea why that particular python module would load on other python programs, whereas mavproxy could not load it, but re-installing the package fixed the problem. Comment out imports until the module loads, and check your installation of the python module that didn't load. Also, try re-installing the required packages one by one, and make sure they all install correctly. That's tripped me up a few times in the past. If all fails, uninstall mavproxy and python, including all installed packages, and start over. Good luck! Let me know if you run into more problems!

@gmorph
Copy link
Contributor

gmorph commented Apr 16, 2015

Closing as original issue is resolved.
Thanks, Grant.

@gmorph gmorph closed this as completed Apr 16, 2015
@thelastpolaris
Copy link

I found a better solution that doesn't require manual checking and re-installation of python modules. Just install this:
sudo apt-get install python-matplotlib python-serial python-wxgtk2.8 python-lxml
sudo apt-get install python-scipy python-opencv ccache gawk git python-pip python-pexpect

Found it here http://dev.ardupilot.com/wiki/simulation-2/sitl-simulator-software-in-the-loop/setting-up-sitl-on-linux/

Hope it helps

@hsuhonghai
Copy link

it's true, it works ([thelastpolaris]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants