void KeySymbols::registerSymbols(xabsl::Engine& engine) { engine.registerBooleanInputSymbol("key.right_foot_right_button_pressed_and_released", &pressed_and_released[KeyStates::rightFootRight]); engine.registerBooleanInputSymbol("key.left_foot_right_button_pressed_and_released", &pressed_and_released[KeyStates::leftFootRight]); engine.registerBooleanInputSymbol("key.left_foot_left_button_pressed_and_released", &pressed_and_released[KeyStates::leftFootLeft]); engine.registerBooleanInputSymbol("key.right_foot_left_button_pressed_and_released", &pressed_and_released[KeyStates::rightFootLeft]); engine.registerBooleanInputSymbol("key.chest_button_pressed_and_released", &pressed_and_released[KeyStates::chest]); }
void BH2011BIKESymbols::registerSymbols(xabsl::Engine& engine) { engine.registerBooleanInputSymbol("motion.kick_forward", this, &BH2011BIKESymbols::getKickForward); engine.registerBooleanInputSymbolDecimalParameter("motion.kick_forward", "motion.kick_forward.y", &ballY); engine.registerBooleanInputSymbolDecimalParameter("motion.kick_forward", "motion.kick_forward.x", &ballX); engine.registerBooleanInputSymbolBooleanParameter("motion.kick_forward", "motion.kick_forward.mirror", &mirror); engine.registerBooleanInputSymbolBooleanParameter("motion.kick_forward", "motion.kick_forward.updates", &updates); engine.registerBooleanOutputSymbol("bike.update", &updating); }
void SoundSymbols::registerSymbols(xabsl::Engine& engine) { // register the sound enums engine.registerEnumElement("sound", "sound.off", 0); engine.registerEnumElement("sound", "sound.victory", 1); engine.registerEnumElement("sound", "sound.asta_la_vista", 2); engine.registerEnumElement("sound", "sound.penalized", 3); engine.registerEnumElement("sound", "sound.playing", 4); engine.registerEnumElement("sound", "sound.battery_low", 5); engine.registerEnumeratedOutputSymbol("sound.request", "sound", &setSoundRequest, &getSoundRequest); }//end registerSymbols
void BH2009ObstacleSymbols::registerSymbols(xabsl::Engine& engine) { engine.registerDecimalInputSymbol("obstacle.distance_to_left_obstacle", &obstacleModel.distanceToLeftObstacle); engine.registerDecimalInputSymbol("obstacle.distance_to_right_obstacle", &obstacleModel.distanceToRightObstacle); engine.registerDecimalInputSymbol("obstacle.distance_to_center_left_obstacle", &obstacleModel.distanceToCenterLeftObstacle); engine.registerDecimalInputSymbol("obstacle.distance_to_center_right_obstacle", &obstacleModel.distanceToCenterRightObstacle); engine.registerDecimalInputSymbol("obstacle.distance_to_closest_obstacle", &distanceToClosestObstacle); engine.registerDecimalInputSymbol("obstacle.distance_to_closest_left", &distanceToClosestObstacleLeft); engine.registerDecimalInputSymbol("obstacle.distance_to_closest_right", &distanceToClosestObstacleRight); }
void MathSymbols::registerSymbols(xabsl::Engine& engine) { // "atan2" engine.registerDecimalInputSymbol("atan2", &getAtan2); engine.registerDecimalInputSymbolDecimalParameter("atan2", "atan2.y", &atan2y); engine.registerDecimalInputSymbolDecimalParameter("atan2", "atan2.x", &atan2x); // "min" engine.registerDecimalInputSymbol("min", &getMin); engine.registerDecimalInputSymbolDecimalParameter("min", "min.value0", &min0Value); engine.registerDecimalInputSymbolDecimalParameter("min", "min.value1", &min1Value); // "max" engine.registerDecimalInputSymbol("max", &getMax); engine.registerDecimalInputSymbolDecimalParameter("max", "max.value0", &max0Value); engine.registerDecimalInputSymbolDecimalParameter("max", "max.value1", &max1Value); // "abs" engine.registerDecimalInputSymbol("abs", &getAbs); engine.registerDecimalInputSymbolDecimalParameter("abs", "abs.value", &absValue); // "sgn" engine.registerDecimalInputSymbol("sgn", &getSgn); engine.registerDecimalInputSymbolDecimalParameter("sgn", "sgn.value", &sgnValue); // "sin" engine.registerDecimalInputSymbol("sin", &getSin); engine.registerDecimalInputSymbolDecimalParameter("sin", "sin.angle", &alphaValue); // "cos" engine.registerDecimalInputSymbol("cos", &getCos); engine.registerDecimalInputSymbolDecimalParameter("cos", "cos.angle", &alphaValue); // "tan" engine.registerDecimalInputSymbol("tan", &getTan); engine.registerDecimalInputSymbolDecimalParameter("tan", "tan.angle", &alphaValue); // "random" engine.registerDecimalInputSymbol("random", &getRandom); // "normalize" engine.registerDecimalInputSymbol("normalize", &getNormalize); engine.registerDecimalInputSymbolDecimalParameter("normalize", "normalize.angle", &normalizeAngle); // "clip" engine.registerDecimalInputSymbol("clip", &getClip); engine.registerDecimalInputSymbolDecimalParameter("clip", "clip.value", &clipValue); engine.registerDecimalInputSymbolDecimalParameter("clip", "clip.min", &clipMin); engine.registerDecimalInputSymbolDecimalParameter("clip", "clip.max", &clipMax); // "vector.abs" engine.registerDecimalInputSymbol("vector.abs", &getVectorAbs); engine.registerDecimalInputSymbolDecimalParameter("vector.abs", "vector.abs.x", &vectorAbsX); engine.registerDecimalInputSymbolDecimalParameter("vector.abs", "vector.abs.y", &vectorAbsY); }
void BH2011GoalSymbols::registerSymbols(xabsl::Engine& engine) { /* * free part angles */ // angle to center of largest free part of opponent goal engine.registerDecimalInputSymbol("opponent_goal.free_part.angle_to_center", this, &BH2011GoalSymbols::getCenterAngleOfFreePart); // angle to outer side of largest free part of opponent goal engine.registerDecimalInputSymbol("opponent_goal.free_part.angle_to_outer_side", this, &BH2011GoalSymbols::getOuterAngleOfFreePart); // angle to inner side of largest free part of opponent goal engine.registerDecimalInputSymbol("opponent_goal.free_part.angle_to_inner_side", this, &BH2011GoalSymbols::getInnerAngleOfFreePart); // angle width of largest free part of opponent goal engine.registerDecimalInputSymbol("opponent_goal.free_part.angle_width", this, &BH2011GoalSymbols::getOpeningAngleOfFreePart); // angle tolerance to largest free part of opponent goal // (how accurate will the robot be positioned) engine.registerDecimalInputSymbol("opponent_goal.free_part.angle_tolerance", this, &BH2011GoalSymbols::getAngleToleranceToFreePart); /* * other perceptions */ // time since opponent goal was last seen in ms engine.registerDecimalInputSymbol("opponent_goal.time_since_last_seen", &timeSinceOppGoalWasSeen); // was the opponent goal recently seen? engine.registerBooleanInputSymbol("opponent_goal.was_seen", &oppGoalWasSeen); // time since any goal was last seen in ms engine.registerDecimalInputSymbol("goal.time_since_last_seen_any_goal", &timeSinceAnyGoalWasSeen); engine.registerDecimalInputSymbol("goal.time_since_last_seen", &timeSinceAnyGoalWasSeen); // was any goal recently seen? engine.registerBooleanInputSymbol("goal.was_seen", &goalWasSeen); // count the number of seen goal posts in current ready state engine.registerDecimalInputSymbol("goal.number_of_sightings_in_ready", &goalsSeenInReadyState); // count the number of seen goal posts since last pickup engine.registerDecimalInputSymbol("goal.number_of_sightings_since_last_pickup", &goalsSeenSinceLastPickup); engine.registerDecimalInputSymbol("goal.angle_to_last_seen", this, &BH2011GoalSymbols::getAngleToLastSeen); engine.registerDecimalInputSymbol("goal.distance_to_last_seen", this, &BH2011GoalSymbols::getDistanceToLastSeen); }
void BH2011ObstacleSymbols::registerSymbols(xabsl::Engine& engine) { engine.registerDecimalInputSymbol("obstacle.distance_to_closest_center_left", this, &BH2011ObstacleSymbols::getDistanceToClosestCenterLeft); engine.registerDecimalInputSymbol("obstacle.distance_to_closest_center_right", this, &BH2011ObstacleSymbols::getDistanceToClosestCenterRight); engine.registerDecimalInputSymbol("obstacle.distance_to_closest_center", this, &BH2011ObstacleSymbols::getDistanceToClosestCenter); engine.registerDecimalInputSymbol("obstacle.distance_to_closest", this, &BH2011ObstacleSymbols::getDistanceToClosest); engine.registerDecimalInputSymbol("obstacle.angle_to_closest", this, &BH2011ObstacleSymbols::getAngleToClosest); engine.registerDecimalInputSymbol("obstacle.free_kick_angle_left", this, &BH2011ObstacleSymbols::getFreeKickAngleLeft); engine.registerDecimalInputSymbol("obstacle.free_kick_angle_right", this, &BH2011ObstacleSymbols::getFreeKickAngleRight); engine.registerBooleanInputSymbol("obstacle.arm_left", this, &BH2011ObstacleSymbols::getArmLeft); engine.registerBooleanInputSymbol("obstacle.arm_right", this, &BH2011ObstacleSymbols::getArmRight); // Vision Based Obstacle Avoidance engine.registerDecimalInputSymbol("obstacle.vision.leftRatio", &leftRatio); engine.registerDecimalInputSymbol("obstacle.vision.rightRatio", &rightRatio); engine.registerDecimalInputSymbol("obstacle.vision.leftRatioBall", &leftRatioBall); engine.registerDecimalInputSymbol("obstacle.vision.rightRatioBall", &rightRatioBall); engine.registerDecimalInputSymbol("obstacle.vision.leftRatioBallFiltered", &leftRatioBallFiltered); engine.registerDecimalInputSymbol("obstacle.vision.rightRatioBallFiltered", &rightRatioBallFiltered); }
void BH2009SoccerSymbols::registerSymbols(xabsl::Engine& engine) { engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.unknown", BehaviorData::unknown); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.dribble", BehaviorData::dribble); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.go_to_ball", BehaviorData::goToBall); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.search_for_ball", BehaviorData::searchForBall); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.go_to_target", BehaviorData::goToTarget); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.prepare_kick", BehaviorData::prepareKick); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.kick", BehaviorData::kick); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.kick_sidewards", BehaviorData::kickSidewards); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.pass", BehaviorData::pass); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.block", BehaviorData::block); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.hold", BehaviorData::hold); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.stand_up", BehaviorData::standUp); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.patrol", BehaviorData::patrol); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.pass_before_goal", BehaviorData::passBeforeGoal); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.kickoff", BehaviorData::kickoff); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.wait_for_pass", BehaviorData::waitForPass); engine.registerEnumElement("soccer.behavior_action", "soccer.behavior_action.prepare_pass", BehaviorData::preparePass); engine.registerEnumeratedOutputSymbol("soccer.behavior_action", "soccer.behavior_action", (int*)&behaviorData.action); engine.registerBooleanInputSymbol("soccer.disable_pre_initial", &disablePreInitialState); engine.registerDecimalInputSymbol("soccer.opponent_goal_angle", &staticSoccerOpponentGoalAngle); engine.registerDecimalInputSymbol("soccer.position_next_to_ball.x", &staticSoccerPositionNextBallX); engine.registerDecimalInputSymbolBooleanParameter("soccer.position_next_to_ball.x", "soccer.position_next_to_ball.x.side", &sideLeft); engine.registerDecimalInputSymbol("soccer.position_next_to_ball.y",&staticSoccerPositionNextBallY); engine.registerDecimalInputSymbolBooleanParameter("soccer.position_next_to_ball.y", "soccer.position_next_to_ball.y.side", &sideLeft); engine.registerDecimalInputSymbol("soccer.position_next_to_ball.angle", &staticSoccerAngleNextToBall); engine.registerDecimalInputSymbolBooleanParameter("soccer.position_next_to_ball.angle", "soccer.position_next_to_ball.angle.side", &sideLeft); engine.registerDecimalInputSymbol("soccer.position_behind_ball.x", &staticSoccerPositionBehindBallX); engine.registerDecimalInputSymbol("soccer.position_behind_ball.y", &staticSoccerPositionBehindBallY); engine.registerDecimalInputSymbol("soccer.position_behind_ball.angle", &staticSoccerPositionBehindBallAngle); }