Added an API for LL to call us to get the path, to simplify obstacle placement. From Wiki:
// After ready is reported, the th will use this query to
// get the initial planned path
GET http://brass-ta/action/query_path
TEST_ACTION:
{TIME: TIME_ENCODING, ARGUMENTS : {}}
ACTION_RESULT:
{TIME: TIME_ENCODING, ARGUMENTS : {path : [String]}}
From Konrad:
Obstacle placement will be performed at startup based on the following interaction:
a. After receipt of DAS_READY, the TH will send TEST_ACTION/action/query_path to the DAS.
b. DAS will respond with the planned path in JSON as a sequence of waypoint identifiers including the start and target as the first and last waypoints, and visiting the target waypoint only once:
{ path : [ “start_waypoint”, …, “target_waypoint” ] }
c. TH will randomly choose an obstacle location from the middle 50% of the path length and send TEST_ACTION/action/place_obstacle with the selected location as:
{ x : Integer, y : Integer }
d. DAS will respond with a string identifier that may be used as the argument to remove_obstacle (per your Wiki page and RR1 python code)
{ obstacle_id : String }
e. After the TH receives the ack, TH will send TEST_ACTION/action/start
The Instruction graphs are stored in a file, but they do not contain the waypoints - just the coordinates. We need some way to encode or get those waypoints. Perhaps we cache an associated file that has the json that should be returned. Something like l1_to_l6_waypoints.json.
Added an API for LL to call us to get the path, to simplify obstacle placement. From Wiki:
From Konrad:
a. After receipt of DAS_READY, the TH will send TEST_ACTION/action/query_path to the DAS. b. DAS will respond with the planned path in JSON as a sequence of waypoint identifiers including the start and target as the first and last waypoints, and visiting the target waypoint only once: { path : [ “start_waypoint”, …, “target_waypoint” ] } c. TH will randomly choose an obstacle location from the middle 50% of the path length and send TEST_ACTION/action/place_obstacle with the selected location as: { x : Integer, y : Integer } d. DAS will respond with a string identifier that may be used as the argument to remove_obstacle (per your Wiki page and RR1 python code) { obstacle_id : String } e. After the TH receives the ack, TH will send TEST_ACTION/action/start
The Instruction graphs are stored in a file, but they do not contain the waypoints - just the coordinates. We need some way to encode or get those waypoints. Perhaps we cache an associated file that has the json that should be returned. Something like l1_to_l6_waypoints.json.