void Robot::startActing()
{

	std::thread newRobotThread([this] {
		auto& world = RobotWorld::getRobotWorld();
		auto waypoint = world.getWayPointByName("Joost");
		auto goal = world.getGoalByName("Leon");

		stop = false;
		if (waypoint)
			drive(waypoint);
		if (goal)
			drive(goal);
	});
	robotThread.swap(newRobotThread);
}
Example #2
0
void Robot::startActing()
{
	std::thread newRobotThread( [this]
	{	stop = false; drive();});
	robotThread.swap( newRobotThread);
}