void Coach::update(SSL_DetectionFrame newFrame) { //update memory if(_memory.size() < 5) { _memory.push_back(newFrame); } else { _memory.push_back(newFrame); _memory.erase(_memory.begin()); //update FieldState fs.bBots.clear(); fs.yBots.clear(); fs.ball = Movable(newFrame.balls(0).x(), newFrame.balls(0).y(), 0, 0); //velocity calculated in analysis for(int i = 0; i < _memory[4].robots_blue_size(); i++) { fs.bBots.push_back(Robot(_memory[4].robots_blue(i).robot_id(), _memory[4].robots_blue(i).orientation(), _memory[4].robots_blue(i).x(), _memory[4].robots_blue(i).y())); } for(int i = 0; i < _memory[4].robots_yellow_size(); i++) { fs.yBots.push_back(Robot(_memory[4].robots_yellow(i).robot_id(), _memory[4].robots_yellow(i).orientation(), _memory[4].robots_yellow(i).x(), _memory[4].robots_yellow(i).y())); } //call analysis to update velocity Analysis(); } }
TEST( expect, movable_expect_with_value ) { auto expect = q::fulfill< Movable >( Movable( ) ); EXPECT_FALSE( expect.has_exception( ) ); EXPECT_EQ( expect.exception( ), std::exception_ptr( ) ); EXPECT_NO_THROW( expect.get( ) ); EXPECT_NO_THROW( expect.consume( ) ); }
Controlable::Controlable() { Movable(); control = NULL; }
Movable MovableFactory(int i) { return Movable(new int(i)); }