Experimenting with a more readable mavlink 1.0 waypoint list/mission file format

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
}

Views: 463


Developer
Comment by Andrew Tridgell on June 22, 2012 at 3:31am

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

Comment by John Wiseman on June 22, 2012 at 12:16pm

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?


Developer
Comment by Mark Colwell on June 23, 2012 at 8:09am

Nice! My eyes thank you.

Comment by John Wiseman on June 23, 2012 at 9:11am

I submitted a pull request (code is at https://github.com/wiseman/mavlink/tree/protobuf_missions).

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service