Connecting to IRIS with Python script and MAVProxy

I am new here and honestly not sure where this should go. Please move it if necessary.

We are working on a drone project for one of my SE classes and I am mainly responsible for figuring out most of the interfacing and communications with the hardware. We are using the 3DR Iris+.

Up until receiving the hardware, I have been successful in setting up MAVProxy and SITL on an Ubuntu (14.04.03) VM and able to play with the simulator. Then I installed dronekit/dronekit-sitl and was able to launch MAVProxy and start using the example scripts by connecting to the IP, so I could get familiar with using some of the API.

I finally have my hands on the hardware and have been attempting to get communication working properly. I am using the USB radio transmitter attached to my PC.. I am able to start up MAVProxy using "mavproxy.py --master=/dev/ttyUSB0,57600 --map --console", and everything pops up as expected. The map shows the drone over my house and I am able to start sending commands on the MAVProxy prompt.

My issue at this point is trying to run a script, such as vehicle_state.py, and have it work. I have tried all variations of loading MAVProxy, with out channels and such, and tried using connect arguments with the script. Basically, I have tried everything I can find in any documentation about this, but it doesn't seem to work as I assume it should. The only thing that I have found it that when I try to run the script with "python vehicle_state.py --connect /dev/ttyUSB0", it starts spewing what looks like garbage into the console:

GPS lock at -1 meters
online system 1
Mode ALT_HOLD
cAPM: ArduCopter V3.2.1 (36b405fb)
APM: PX4: ce602658 NuttX: 475b8c15
APM: Frame: QUAD
APM: PX4v2 004F0028 30345107 36353832
Flight battery 100 percent
~`x~@>~`~@>f`3`x`xfx?``xffp` `x~?`xx<f~`x`@`@ xf`3x?``0`x0``G3~~Lx0f`x0x<

fxx`?f<8x@0f~3~q0`f``3q ``x`~Lxf`<0~D8fxx3?0f`0"f0`f`0`0~<|3xf<f`p|3~x~xf0~x33```3``@`<"xx~x`O3~~Dx```<ff`f`<"x``f<8`f3<`f~@<~~fxffx`xx``x`3` ``303`O3~~Dxf`?```fx0xfx`x` `x~3` ``xfx``~ff``fx<f`xfx~3`x`"<03"f@?~@0`g|f`G`@`f`D"<03f~3x`<"x>0~0x|``3"xx@0`|` ``x~@0xD~fxffx~xx`?~0~`<0f<"D`~x?~Dfxf0fx`fx?`< ~0~f`0```f@~`Gx0`fx`0f``~0f`f|xG`f`~Dff`ffxff0x`x0`x3xx~`?<0~~~``a`xf`fx``0f~f``x<f`<0`x?<0p3``xf``f<0`x`<f0f```fx`x0`fno link
link 1 down

I have installed APM Planner in an attempt to see if maybe I need to prep the radio or drone first. Of course, everything seems to work through that. I have also downloaded the Iris parameters and made sure to load those in MAVProxy before trying anything.

I have been going through as much documentation as I can but I cannot seem to find any definitive steps (that work) on how to do what I am trying to do. We do not want to use a GCS because we are writing a front end that will handle sending commands.

Am I not loading MAVProxy or running the scripts correctly? Or is there something else that I am missing?
Thanks

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Okay, I added --out=udp:127.0.0.1:14550 to my my MAVProxy call and then tried running the script to the out port. Now I just get a stream of "Waiting for vehicle to initialise..."

    • I think it is just failing some pre-arm check but even setting arm_checks doesn't work.

This reply was deleted.

Activity

Santiago Perez liked Santiago Perez's profile
Saturday
More…