I am trying to run a dronekit program from the drone itself. Since all dronekit programs start off with connecting to the drone I decided to create the mavlink connection through the local feedback IP - but I can’t seem to get it to work. In short, what should I type in as $TELEM1 (or $TELEM2) to send telemetry to the localhost/local feedback loop?
Here is what I did:
- I make sure the localfeedback IP is 127.0.0.1 with
2)then <sudo nano /etc/default/arducopter> and mofify the telem variables:
TELEM1="-A udp:127.0.0.1:14550" #Localfeedback loop
TELEM2="-A udp:10.0.0.48:14550" #Pointed to GCS
then #implement changes
then run hello-drone.py dronekit algorithm.
–> it should just connect to the drone and output some information about it. Look at link for more info.
5)It says no heartbeat detected and times-out.
Note 1: I kept the telem pointed to my GCS and still managed to connect and receive telemetry. (and run dronekit apps from there.)
Note 2: I am fairly sure the dronekit program works just fine because it works when I run it from the GCS. (Yes, I changed the connection string appropriately.)
Thank you in advance!
I appreciate any help
You can not use the same telemetry option twice. Use -A and -C instead.
Some Progress! Now I can get one or the other to work but I cannot get both of them to work simultaneously.
It seems only the one which is named $TELEM1 works. When setup as in the photo below I can run dronekit programs from the drone itself but I cannot connect on my GCS.
When I switch $TELEM2 to $TELEM1 (and vice-versa) then the opposite is true. Essentially it seems the other telems are disabled somehow - any ideas? Help would be incredibly appreciated. Thank you in advance.
Further Testing/Notes. It is not which is named TELEM1 that matters, it is whichever is first in ARDUPILOT_OPTS. So if TELEM2 is first then that is the one that will work.
May I ask you to run
systemctl status arducopter and post the output here?
Your wish is my command. I really appreciate the help.
Here is a screenshot of the output
Please let me know if you see anything that sticks out/anything else you want me to try. I am curious though,
what is that first item there?
6667 /bin/sh -c /usr/bin/arducopter $TELEM1 $TELEM2
It looks like it just points to ARDUPILOT_OPTS as shown in the first screenshot.
Thank you again,
Sorry for delayed response.
It seems the issue might occur due to the incorrect argument passing to ardupilot executable. Please delete comments in TELEM1 and TELEM2 strings. It should look like these:
It worked! Thank you so much!
It looked like having comments in the same line was causing the issue!