-
Notifications
You must be signed in to change notification settings - Fork 85
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
Unable to run mavproxy in the background #51
Comments
For what it's worth, replacing line 1514 of mavproxy.py, currently line = raw_input(mpstate.rl.prompt) with line = '\n' appears to make it usable. We should probably consider allowing a command-line option to disable TTY input to mavproxy. Want me to go ahead and draft a fix? |
Yes please! Thanks for reporting and troubleshooting. But first can you try running a new version of mavproxy (from Tridge on Pat On Feb 23, 2013, at 5:20 PM, David Court [email protected] wrote: For what it's worth, replacing line 1514 of mavproxy.py, currently line = raw_input(mpstate.rl.prompt) with line = '\n' appears to make it usable. We should probably consider allowing a Want me to go ahead and draft a fix? — |
Sure, I can give that a whirl. Is it a direct drop-on replacement for mavproxy.py? I thought I'd seen somewhere that there are some mavelous-specific patches - but perhaps that was mavlink? On 24 Feb 2013, at 01:43, Pat Hickey [email protected] wrote:
|
Its a bit more complicated than that - mavelous is effectively 1. a python Since then, upstream mavproxy's module system has been reworked a bit Anyway, the starting point for pulling in upstream mavlink would be to take FWIW, I'm also investigating switching away from MAVProxy to a completely
On Sun, Feb 24, 2013 at 2:29 AM, David Court [email protected]:
|
I got as far as determining that there's no relevant difference in the latest mavproxy. But when I tested my setup in the field at the weekend, I noticed that it still didn't launch mavelous automatically on boot, so I think there's still something I need to figure out before I formalise this into a fix. Interesting to see the progress of Andropilot. I for one would be keen to see mavelous continue to support RasPi, whatever happens to the backend, although it does seem that the Android approach has a lot going for it. |
OK, thanks for looking into it, keep us posted. We'll definitely be supporting running on a raspberry pi, no matter which On Tue, Feb 26, 2013 at 3:11 PM, David Court [email protected]:
|
Use the use this to re-attach to the screen When in the mavproxy screen, do not CntrlC to exit if you want to keep it running. Do CntrlA - d to detach |
Here's a workaround for running mavproxy in a boot script: https://github.com/tridge/MAVProxy/issues/17 Allows you to pipe i/o to mavproxy as well |
Todd, I use the screen command launched as detached. Then you can re-attach to /Matt On 16 August 2013 21:38, Todd Stellanova [email protected] wrote:
|
Thanks for the info Matt, that definitely helps with debugging. Long term we want to be able to pipe commands to mavproxy so we may just end up running the forked version headless. On Aug 16, 2013, at 1:41 PM, Matthew Coleman [email protected] wrote:
|
This thread came through to my gmail which is utterly confusing but lucky You don't need to modify anything. Just use screen. It provides a virtual terminal for mavproxy to run in without displaying it. You can then re-attach to this screen using an ssh login or the standard terminal. Headless not required. The script launched on boot: "#!/bin/bash #cd /home/root/mav/ #start a screen session for mavproxy but detach from it #read -p "mavproxy launched in background. Use screen -r mavproxy to attach" -n1 -s -t3" |
I agree screen is one solution if you want to interact manually with mavproxy after it's launched. It's not great if you want to pipe the output of mavproxy to another process, or pipe the output of another process to mavproxy. Sure, you could probably cobble something together with screen+mkfifo. |
That is a communication method that I don't understand. Screen works with UDP connections so I falsely presumed that IP and server connections would also work. If you need a named data pipe of some sort then I have no idea. |
I'm trying to run mavelous completely headless at boot time on a Raspberry Pi (Debian Linux).
I find that it runs fine when run within an ssh session in the foreground, but when run in the background, it bombs out pretty early on - just after presenting the "MAV>" prompt. I don't see any interesting logs being produced, sadly, even with --logging-level=DEBUG.
To repro, simply:
python mavproxy.py --module mavelous --master=/dev/ttyUSB1 --baud=57600 &
The text was updated successfully, but these errors were encountered: