rgmhtt
(Bob)
December 24, 2023, 1:44am
1
I am pulling out what little hair I have here on what to put into a txt file to feed a mission in waypoints to MAVproxy.
I have looked at:
https://ardupilot.org/mavproxy/docs/getting_started/examples.html
And no sample input files.
I have looked at:
https://ardupilot.org/copter/docs/common-mavlink-mission-command-messages-mav_cmd.html#mav-cmd-mission-start
And I see some commands, but not what format in a txt file for uploading.
Can someone point me to some sample files that can get me going on this?
thanks
Josephjj
(Joseph jj)
December 24, 2023, 10:13am
2
If you are sending using txt file, you need a mission planner. You can save your mission opening it to get an idea.
If you are sending directly through mavproxy or mavlink, then you have to script it using python or c.
Josephjj
(Joseph jj)
December 24, 2023, 10:13am
3
The answer you need is on mavlink website.
rgmhtt
(Bob)
December 24, 2023, 10:44am
4
I am using Fedora, so MissionPlanner is of limited use. I will look into mono, as I see it is available for Fedora.
Can you point me to examples with mavlink using python?
I have been doing some python scripting so probably could get that working.
rgmhtt
(Bob)
December 24, 2023, 10:46am
5
But where? I already have spend a couple hours going through that website and not see any example of the actual command input formats, nor any example of a flight via waypoints.
But your prior comment that Python or c is needed may point to where I have to look. I was expecting an input file option into mavlink.
Webillo
(Webillo)
December 24, 2023, 10:50am
6
rgmhtt:
sample files
For MP, do you mean a xxx.waypoints like this ?:
QGC WPL 110
0 1 0 16 0 0 0 0 33.74113111 -118.374600 178 1
1 0 10 22 0 0 0 0 33.74116111 -118.374600 1.00 1
2 0 10 201 0 0 0 0 33.74111111 -118.375 1.00 1
3 0 0 93 0.001 0 0 0 0 0 0 1
4 0 10 16 0 0 0 0 33.74111111 -118.37472222 4.00 1
5 0 10 16 0 0 0 0 33.74117111 -118.37472222 1.00 1
6 0 10 16 0 0 0 0 33.74124111 -118.37472222 4.00 1
7 0 10 16 0 0 0 0 33.74117111 -118.37472222 1.00 1
8 0 10 16 0 0 0 0 33.74111111 -118.37472222 4.00 1
9 0 10 16 0 0 0 0 33.74105111 -118.37472222 1.00 1
10 0 10 16 0 0 0 0 33.74099111 -118.37472222 4.00 1
11 0 10 16 0 0 0 0 33.74105111 -118.37472222 1.00 1
12 0 10 177 3 3 0 0 0 0 0 1
13 0 0 93 0.001 0 0 0 0 0 0 1
14 0 3 16 0 0 0 0 33.74111111 -118.37472222 20.00 1
15 0 10 16 0 0 0 0 33.74117111 -118.37472222 1.00 1
16 0 3 16 0 0 0 0 33.74124111 -118.37472222 20.00 1
17 0 10 16 0 0 0 0 33.74117111 -118.37472222 1.00 1
18 0 3 16 0 0 0 0 33.74111111 -118.37472222 20.00 1
19 0 10 16 0 0 0 0 33.74105111 -118.37472222 1.00 1
20 0 3 16 0 0 0 0 33.74099111 -118.37472222 20.00 1
21 0 10 16 0 0 0 0 33.74105111 -118.37472222 1.00 1
22 0 3 177 13 3 0 0 0 0 0 1
23 0 10 21 0 0 0 0 33.74119111 -118.374600 0.00 1
You can modify it with a column selection editor (Textpad, Geany…) or with a spreadsheet. If the first column gets messy, copy and paste it from one generated in a spreadsheet. Other columns to change manually may be the waypoint type, or the coordinates, copying and pasting them with column selection.
I think that in MP you get a similar result if you create one and use something as save as, but for manual modifications you can go this way.
MP is ported to Linux and MacOS, but it is not very comfortable to use.
Josephjj
(Joseph jj)
December 24, 2023, 10:54am
7
Josephjj
(Joseph jj)
December 24, 2023, 10:56am
8
I use raspian or armbian. Maybe once ubuntu on a micro computer. Nowadays stick to rasbian for easy portability between raspberry.
rgmhtt
(Bob)
December 24, 2023, 11:00am
9
Where is a definition of all the columns? I get the log/lat/alt, but not the rest.
And I did see one post about the first line that to use spaces, not tables, but again no definition of those fields.
Thank you for your help.
rgmhtt
(Bob)
December 24, 2023, 11:02am
10
Great! I will plow through this python page.
Josephjj
(Joseph jj)
December 24, 2023, 11:15am
11
It follows the mavlink input. You can find the mavlink waypoint command in mavlink common page.
Webillo
(Webillo)
December 24, 2023, 11:35am
12
I think it is somehow documented here and there, and somehow in MP, but above example, with a variety of manual modifications, shows it (from fifth are parameters, which may be meaningless depending on the waypoint type):
third: (3/10) is waypoint reference (absolute/relative);
fourth: type;
fifth/sixth: for 93 (0.001) delay, for 177 (3/3, 13/3) jump to/jumps;
etc.
I use tabs all the time, since that makes it easier to read. I don’t know if spaces are valid for first line.
rgmhtt
(Bob)
December 24, 2023, 1:45pm
13
It looks like I can use socat to create a virtual null modem for testing. e.g.
socat -d -d pty,rawer,echo=0 pty,rawer,echo=0
which on my system is creating /dev/pts/18 & 19
I can do something as simple as
cat < /dev/pts/19
and have mavproxy write to /dev/pts/18 and see it working.
RobinD
(Robin LI)
April 7, 2024, 8:04am
14
Hi @rgmhtt ,
I am meeting the same issue like you do.
May I ask how you to write a txt file defining waypoints and how to make Ardupilot to trach these waypoints using MAVproxy?
Josephjj
(Joseph jj)
April 30, 2024, 10:05am
15
The txt file is for mission planner. If mavproxy then you got to code it yourself using python or c++