Revision 57e82e6c
ID | 57e82e6cd2377368ade47da9d4658bd360fa0d66 |
Fixed some of the syntax problems with the navigationMap fsm and tested it, it seems to generally work. Note the fsm eta still does not work for various reasons.
scout/libscout/src/behaviors/navigationMap.cpp | ||
---|---|---|
110 | 110 |
|
111 | 111 |
navigationMap::update_state(Turn turn_made) |
112 | 112 |
{ |
113 |
Edge* possible_edges = get_outbound_edges(current_state);
|
|
113 |
Edge* possible_edges = get_outbound_edges(curr_state); |
|
114 | 114 |
int arr_size = sizeof(possible_edges)/sizeof(Edge); |
115 |
for(i=0;i<arr_size;i++) |
|
115 |
for(int i=0;i<arr_size;i++)
|
|
116 | 116 |
{ |
117 | 117 |
//sets the current state to the state associated with the turn made |
118 | 118 |
if(GET_EDGE_DIR(possible_edges[i]) == turn_made) |
119 | 119 |
{ |
120 | 120 |
int speed = 10000;//its over 9000 |
121 |
current_state = GET_EDGE_STATE(possible_edges[i]);
|
|
121 |
curr_state = GET_EDGE_STATE(possible_edges[i]); |
|
122 | 122 |
//TODO: get actual speed |
123 | 123 |
arrival_time = ros::Time::now() + |
124 | 124 |
GET_EDGE_DIST(possible_edges[i])/speed; |
125 |
return current_state;
|
|
125 |
return curr_state; |
|
126 | 126 |
} |
127 | 127 |
} |
128 | 128 |
return -1;//failure to succeed |
Also available in: Unified diff