In considering certain relatively difficult (but possible/reasonable) commands, we focused on the following:
Verbs: move
Modes: quickly, slowly
Constraints: front/back/left/right, near, behind, between, along
Goals: front/back/left/right, to , behind, between
(Some of the example words, such as the "along" goal, we ignored because they were not defined in the slides and had no clear definition.)
This week, I focused on implementing the front/back/left/right/to/behind Goals and the "along" Constraint. My initial implementation ignored several parts of the specified grammar for the purpose of prototyping the behavior algorithms (Tue-Fri). I then spent time restructuring it to conform to the grammar and behave more robustly (Sat).
As discussed in our meeting, the "along" constraint was implemented by using a "navigation queue," a structure that assists a GoTo node in following a path continuously without slowing down or stopping. This structure allows an agent to follow a path "along" the side of a structure, "left of" a structure on the way to another goal, and so on.
A structure is annotated with a perimeter of "navigation waypoints," and is then called "navigable." This annotation allows an agent to know the shape of a path around an object. A NavWaypoint can be tagged with the PerimeterUnnavigable tag to indicate part of the path which is blocked by other structures.
The PerimeterDefinition can also contain a null NavWaypoint, which indicates an edge that cannot be crossed by walking (e.g. between the waypoints along either side of a river). If an attempt is made to cross such an edge, the agent currently moves along the path to one end and stops.
The goal point on an object is also controlled by the navigation waypoints. Some items in the Goal enum specify a cardinal direction with relation to the goal object--using these causes the agent to move to one of those waypoints (still moving "along" another object, if specified).
Further work:
- Testing interations between goals and constraints
- Implementing better behavior for the "river" scenario
- Implementing more goal/constraint prepositions
No comments:
Post a Comment