I find the tab-delimited waypoint list files used in mavlink to be hard to read, so I added Protocol Buffer text format to the formats that mavwp.py can read and write.
I still think it can be improved to be even easier to read, but here's my current version of the mission defined in ardupilot-mega/Tools/autotest/mission2.txt:
QGC WPL PB 110
defaults {
# Default coordinate frame for this mission.
frame: FRAME_GLOBAL_RELATIVE_ALT
}
waypoint {
command: CMD_NAV_WAYPOINT
x: -35.362881
y: 149.165222
z: 582.0
}
waypoint {
command: CMD_NAV_TAKEOFF
x: -35.362881
y: 149.165222
z: 20.0
}
waypoint {
command: CMD_NAV_WAYPOINT
param2: 3.0
x: -35.363949
y: 149.164151
z: 20.0
}
waypoint {
command: CMD_CONDITION_YAW
param1: 640.0
param2: 20.0
param3: 1.0
param4: 1.0
}
waypoint {
command: CMD_NAV_LOITER_TIME
param1: 35.0
param4: 1.0
x: 0.0
y: 0.0
z: 20.0
}
waypoint {
command: CMD_NAV_WAYPOINT
param2: 3.0
x: -35.363287
y: 149.164958
z: 20.0
}
waypoint {
command: CMD_NAV_WAYPOINT
param2: 3.0
x: -35.364865
y: 149.164952
z: 20.0
}
waypoint {
command: CMD_CONDITION_DISTANCE
param1: 100.0
}
waypoint {
command: CMD_CONDITION_CHANGE_ALT
z: 40.0
}
waypoint {
command: CMD_NAV_WAYPOINT
param2: 3.0
x: -35.363165
y: 149.163905
z: 20.0
}
waypoint {
command: CMD_NAV_WAYPOINT
param2: 3.0
x: -35.363611
y: 149.163583
z: 20.0
}
waypoint {
command: CMD_DO_JUMP
param1: 11.0
param2: 3.0
}
waypoint {
command: CMD_NAV_RETURN_TO_LAUNCH
}
waypoint {
command: CMD_NAV_LAND
}
Comments
I submitted a pull request (code is at https://github.com/wiseman/mavlink/tree/protobuf_missions).
Nice! My eyes thank you.
Will do, Andrew.
BTW while working on this I had a question about MAV_CMD_DO_SET_ROI being in mavlink 0.9 but not in mavlink 1.0. I posted to mavlink@googlegroups.com about it, but it doesn't seem like the moderator checks the queue very often. Is there a better place to discuss mavlink?
Thanks, that looks like a good idea!
Can you put the changes in a fork of my github tree so I can look at merging them?
Cheers, Tridge