Heading & Depth data to surface?

The problem appears to be with using the ip address 0.0.0.0. This works on Linux, maybe not Windows. Can you try changing this line to 127.0.0.1, run setup.py and try again?

Now the only problem is how do I get comms back on Qgroundcontrol.

It seems that I can connect either the QGroundcontrol Or the Serial output on port 14550

14551 does not work on qGroundControl

I am guessing this line does not work

python .\MAVProxy\mavproxy.py --master=udpin:0.0.0.0:14550 --out=udpout:0.0.0.0:14551

Can you try 127.0.0.1?

OK I changed the batch file for this and it worked:

cd …
python setup.py build install
python .\MAVProxy\mavproxy.py --master=udpin:0.0.0.0:14550 --out=udpout:127.0.0.1:14551
pause

Thanks for the help guys, it’s been an uphill battle but we got there.

2 Likes

Hi Etienne, can you tell me what software do you use to connect the UDP output to a Serial COM?

Hello Renan,

It is a software I designed to be a serial server. I limited it to 10 channels in or out UART or UDP. It can parse bits from several channels and send the results to com port or UDP socket.

I am not ready to put it to market yet as I am not setup for distribution and there are still a lot of mods I want to make.

I hope later this year I can release it.

Cheers,
E.

1 Like

Hi Jacob
How did you load DepthOutpt module?
I’m using linux ubuntu and I’m not able to load modules.

I got this error:

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

Hello @Rocampo ,

This module only exist in Blue Robotics branch, like @jacob said here.

You need to install this version to use it :slight_smile:

Hi Jacob
Can you send me a mavproxy module that do not output Json format string?
I’m receiving other strings normally in my software, I dont know why the Json format is given me some problems.
I’ve been trying to edit your mavproxy_DepthOutput.py module, but I’m not familiar with Python.

I’ve tried to edit this part of your module:

datagram = json.dumps(self.data)
self.port.sendto(datagram, (self.ip, self.portnum))

can you help me?

Hi Jacob
Can you send me a mavproxy module that do not output Json format string?
I’m receiving other strings normally in my software, I dont know why the Json format is given me some problems.
I’ve been trying to edit your mavproxy_DepthOutput.py module, but I’m not familiar with Python.

I’ve tried to edit this part of your module:

datagram = json.dumps(self.data)
self.port.sendto(datagram, (self.ip, self.portnum))

can you help me?

Can you share the code that is having trouble with the json? What language are you using?

Hi Jacob
The problem wasn’t the Json format.

Added this line on the module:

    datagram = json.dumps(self.data)        
    self.port.sendto(datagram, (self.ip, self.portnum))

—> self.port.sendto(“\r\n”, (self.ip, self.portnum))

Without the “\r\n” on the end of the string my software was receiving the data but not showing it on the screen. Now it’s working for me.

Thank you!

1 Like

17 posts were split to a new topic: Installing mavproxy help

I get the following error after issuing command “module load DepthOutput”

MANUAL> module load DepthOutput
MANUAL> Outputting depth on UDP://0.0.0.0:25102
Loaded module DepthOutput
Traceback (most recent call last):
File “.\MAVProxy\mavproxy.py”, line 737, in periodic_tasks
m.idle_task()
File “build\bdist.win-amd64\egg\MAVProxy\modules\mavproxy_DepthOutput.py”, line 63, in idle_task
self.send_data()
error: [Errno 10049] The requested address is not valid in its context

I am running on Windows 10
I have installed Anaconda 2 (Python 2.7)
I have downloaded Blue Robotics fork

From Anaconda…
pip install -r requirements.txt in mavproxy root (seems to install without errors)
setup.py build install (seems to install without errors, “Finished processing dependencies for MAVProxy==1.6.1”)
mavproxy.py --master=udpin:192.168.2.1:14550 --out=udpout:127.0.0.1:14551 (some failures shown here)

(base) C:\Users\colins\Documents\MAVProxy-master>python .\MAVProxy\mavproxy.py --master=udpin:192.168.2.1:14550 --out=udpout:192.168.2.1:14551
Connect udpin:192.168.2.1:14550 source_system=255
Failed to load module: No module named adsb. Use ‘set moddebug 3’ in the MAVProxy console to enable traceback
Running script (C:\Users\colins\AppData\Local\MAVProxy\mavinit.scr)
Running script C:\Users\colins\AppData\Local\MAVProxy\mavinit.scr
→ set moddebug 2
→ module load help
Traceback (most recent call last):
File “.\MAVProxy\mavproxy.py”, line 279, in load_module
m = import_package(modpath)
File “.\MAVProxy\mavproxy.py”, line 409, in import_package
mod = import(name)
File “build\bdist.win-amd64\egg\MAVProxy\modules\mavproxy_help.py”, line 11, in
ImportError: No module named wxversion

Traceback (most recent call last):
File “.\MAVProxy\mavproxy.py”, line 279, in load_module
m = import_package(modpath)
File “.\MAVProxy\mavproxy.py”, line 409, in import_package
mod = import(name)
ImportError: No module named help

Failed to load module: No module named help. Use ‘set moddebug 3’ in the MAVProxy console to enable traceback
Unknown command ‘graph timespan 30’
Log Directory:
Telemetry log: mav.tlog
aiting for heartbeat from 192.168.2.1:14550
MAV> fence breach
online system 1
MANUAL> Mode MANUAL
APM: ArduSub V3.5.3 (ad81760b)
APM: PX4: 8d505a02 NuttX: 1a99ba58
APM: PX4v2 00520026 3038510A 31353236
Flight battery warning
Received 689 parameters
Saved 689 parameters to mav.parm
APM: Internal pressure critical!

module load DepthOutput

MANUAL> module load DepthOutput
MANUAL> Outputting depth on UDP://0.0.0.0:25102
Loaded module DepthOutput
Traceback (most recent call last):
File “.\MAVProxy\mavproxy.py”, line 737, in periodic_tasks
m.idle_task()
File “build\bdist.win-amd64\egg\MAVProxy\modules\mavproxy_DepthOutput.py”, line 63, in idle_task
self.send_data()
error: [Errno 10049] The requested address is not valid in its context

I see the depth output on UDP is set to 0.0.0.0. Is there some place I need to set this to 127.0.0.1? Is there anything else you see that is wrong?

Thanks!

Hello Colins,

What are you trying to do?
You should change this to 127.0.0.1 or something else.
This should not be hardcoded, I’ll add a note to fix it.

Thanks Willian. Editing the IP address in the mavproxy_DepthOutput.py file now outputs data.

I am working on getting the Heading and Depth from the ROV in NMEA formats HDT, and DPT. I want to bring this data into another piece of software I will be using with the ROV. I think there is enough info in the forum to get me started on that part next.

Thank a lot @patrickelectric . Can you give some reference to build GUI(tkinter) in python and display those messages on that?

Hi,

I would recommend to use the official documentation webpage: Graphical User Interfaces with Tk — Python 3.10.6 documentation