Cooperating Bottle Collector: or_while, messages, attached QuLog actions, modified regression

The file qulog/examples/bottle_collector/coopBottleCollector.qlg is also a TeleoR control program for a bottle collecting robot but with important differences from the program just discussed. The controlled robot is in a physical space occupied by second bottle collecting robot controlled by another agent. Collisions, even near misses, must be avoided, and the robot agents have a joint task of having their robots collect and deliver to a single drop area a specified number of bottles. When this total has been reached each robot should stop collecting bottles. Both robots are controlled using the same TeleoR program.

In order that each robot can be stopped when the requisite number of bottles have been collected their controlling agents communicate via the Pedro server. When each agent is launched using the teleor command it is given its own public name and each agent sends messages to the other using its public name.

To avoid collisions the robots need to have some means of 'seeing' each other. Minimally each robot needs to be able to sense when the other robot is 'near' and 'in front'. Each has a camera with simple image analysis software that generates the see(thing,dir) percepts where thing is a bottle or the drop. We shall assume this is now able to generate see percepts where thing is robot. If we are just using colour blob detection, all we need to assume is that each robot has a different colour from bottles and the drop. We could have, for example, painted each robot in such a way that the camera image processing could determine the approximate orientation of a seen robot as well as its distance and relative direction. Generally, the more sophisticated the percepts the less work the agent needs to do in determining what to do. We have deliberately kept visual processing simple to show that, when we have communication, message exchange can be used to enhance perception.

Recall that when an TeleoR agent is started it creates a message thread for processing messages - all messages sent to an agent are placed in the message queue of this thead. We must therefore program the message handler to convert such messages into dynamic beliefs which can be queried along with the latest percepts in TeleoR action rules. In addition TeleoR action rules have to include message send actions to other controlling agents, as well as action messages to controlled robots.



Subsections