Resolving Arguments in Software

January 3, 2017

As we build a software base for our robot, we regularly add robot behaviors which want to tell the robot where to go. However, with only one boat and multiple behaviors trying to direct it, we need something to resolve disagreements and decide on the final course the boat will follow. This final decision making is done by an arbiter: a piece of code which takes requests from all of the different behaviors and combines them into a single command as shown below.

This arbiter is for our omni-directional boat, it controls heading, speed, and rotation rate. Heading is the first thing that is decided: each behavior indicates how preferable each heading is. These preferences are scaled based on weights for each behavior, then combined to find the overall most preferable heading. For each heading, every behavior indicates how fast it would like to go if the boat were to go in that direction. After the heading is decided, the arbiter looks through all of the speed votes associated with that heading and takes the minimum. This way any behavior can dictate the actual speed of the boat. Finally, turn rate is an independent variable. Each behavior votes for various turn rates in a single array, using the same voting style as the heading votes, and the most preferred turn rate is chosen.

--

--