| 128 | {} |
| 129 | |
| 130 | NodeStatus tick() override |
| 131 | { |
| 132 | if(status() == NodeStatus::IDLE) |
| 133 | { |
| 134 | setStatus(NodeStatus::RUNNING); |
| 135 | _halted = false; |
| 136 | std::cout << "FollowPath::started" << std::endl; |
| 137 | _initial_time = Now(); |
| 138 | } |
| 139 | |
| 140 | // Yield for 1 second |
| 141 | while(Now() < _initial_time + Milliseconds(600) || _halted) |
| 142 | { |
| 143 | return NodeStatus::RUNNING; |
| 144 | } |
| 145 | if(_halted) |
| 146 | { |
| 147 | return NodeStatus::IDLE; |
| 148 | } |
| 149 | return tickImpl(); |
| 150 | } |
| 151 | void halt() override |
| 152 | { |
| 153 | std::cout << "FollowPath::halt" << std::endl; |