A few new features to pHelmSG

Wednesday, April 29, 2009

One of the most annoying dangerous things about operating our vehicle is having typos in the mission script. When coding up the string of behaviours that are collectively a mission, an inadvertent typo or even just an oversight can lead to the mission ending too soon, critical behaviours not getting called, etc. There has never been any way for the user to get any kind of feedback of the text-based mission script, other than checking it twice... & then a third time.

To remedy this, I added a mission preview feature. The missions now generate a text-based mission graph & transmit it (through a MOOS variable called MISSION_CHART) to the GUI app running on the operator's console. The GUI then generates a preview image using the GraphViz, and displays it for the operator... before they hit the "START" button.

Here's an example:

In this example, the AUV dives down to 4.5 meters of alititude, then maintains 2.5, then 2.0, then 1.5 meters, before surfacing. You'll notice the various safety behaviours running in addition to the main mission, as well.

There are certainly some improvements to be made. I'd like the flag-nodes in the chart to be much less prominent than the behaviour-nodes. Also, the behaviours-nodes should give some more description of the behaviour's attributes. The hooks are already in the behaviour-base class to do this... I just need to write it into the child behaviours themselves.



In looking at the above example, you may have noticed (if you are at all familiar with looking at MOOS scripts), that the various behaviours now have more than one way of exiting. Successful completion, timing out, & error conditions all throw different flags. I've often had a behaviour timeout, or worse, fail & then the mission proceeds to the next behaviour as if it were successful. I'd prefer to have a little more control over the program flow when a behaviour is running.

Coming soon: loopable behaviours.