{
    "componentChunkName": "component---src-components-page-template-jsx",
    "path": "/system/subsystems/behaviour",
    "result": {"data":{"mdx":{"id":"18ea7393-f766-5239-a3f8-07a4a1a0e774","body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"section\": \"System\",\n  \"chapter\": \"Subsystems\",\n  \"title\": \"Behaviour\",\n  \"description\": \"Behaviour and how it works in the NUbots codebase.\",\n  \"slug\": \"/system/subsystems/behaviour\",\n  \"authors\": [\"Ysobel Sims (@ysims)\"]\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Alert = makeShortcode(\"Alert\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"The behaviour subsystem includes the purpose, strategy and planning layers of the system. These utilise the Director system and will be made up of Providers and Tasks. The behaviour subsystem is responsible for the high-level decision making of the robot.\"), mdx(\"h2\", {\n    \"id\": \"planning\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#planning\",\n    \"aria-label\": \"planning permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Planning\"), mdx(\"p\", null, \"The planning layer is given a straightforward goal and uses mathematics to determine how to achieve that goal using skills. These skills are generally \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/system/subsystems/motion\"\n  }, \"motions\"), \", such as kicking, walking and getting up. Examples of planners are the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"#walk-path-planner\"\n  }, \"walk path planner\"), \" and the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"#kick-planner\"\n  }, \"kick planner\"), \".\"), mdx(\"h3\", {\n    \"id\": \"walk-path-planner\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#walk-path-planner\",\n    \"aria-label\": \"walk path planner permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Walk Path Planner\"), mdx(\"p\", null, \"There are three main walk path planners. Each are Providers and emit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Walk\"), \" Tasks.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"WalkTo\"), \": This planner is given a vector position and heading to walk to in robot space. It moves towards the position linearly and rotates to reach the given heading. As it approaches the position to walk to, it decelerates so it stops smoothly.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"TurnOnSpot\"), \": This planner is given a direction to rotate (clockwise or anti-clockwise) and rotates in that direction on the spot.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"TurnAroundBall\"), \": This planner assumes the ball is in front of the robot and pivots around it so that the ball is still in front of the robot. It is given a direction to rotate (clockwise or anti-clockwise). This is useful for aligning the robot with the ball and a target, ie the ball or a teammate.\")), mdx(\"h3\", {\n    \"id\": \"kick-planner\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#kick-planner\",\n    \"aria-label\": \"kick planner permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Kick Planner\"), mdx(\"p\", null, \"The kick planner checks if the ball is close enough to kick and if we are aligned towards our target, ie goal or teammate. When these conditions are satisifed, it emits a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Kick\"), \" Task.\"), mdx(\"h3\", {\n    \"id\": \"look-planner\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#look-planner\",\n    \"aria-label\": \"look planner permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Look Planner\"), mdx(\"p\", null, \"Looking does not often need planning functionality behind it, as a vector to look to can be given directly to the skill. We do implement a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"LookAround\"), \" planner that oscillates between points given from the module's configuration file. This is useful for looking around the field for the ball.\"), mdx(\"h2\", {\n    \"id\": \"strategy\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#strategy\",\n    \"aria-label\": \"strategy permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Strategy\"), mdx(\"p\", null, \"The strategy modules contain a high-level request that utilises environment information and the planning layer to achieve its goal. The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"module/strategy\"), \" folder contains these strategies. We list some of these with their functions below.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"StandStill\"), \": uses the walk engine to stand still.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"FindBall\"), \": if the ball is not visible, uses the look and walk planners to find it\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"WalkToBall\"), \": uses ball localisation to emit a Task to the walk path planner.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"LookAtBall\"), \": uses ball localisation to emit a Task to the look planner to look at the ball.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"KickToGoal\"), \": uses field localisation to determine when to emit a Task to the kick planner.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"AlignToGoal\"), \": uses field localisation to determine when to emit a Task to the walk path planner to pivot around the ball to face the goal.\")), mdx(\"h2\", {\n    \"id\": \"purpose\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#purpose\",\n    \"aria-label\": \"purpose permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Purpose\"), mdx(\"p\", null, \"The purpose layer determines the overall goal of the robot. For soccer-playing, it contains the logic for soccer positions. These modules form the root of the Director tree.\"), mdx(\"h3\", {\n    \"id\": \"soccer\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#soccer\",\n    \"aria-label\": \"soccer permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Soccer\"), mdx(\"p\", null, \"The Soccer purpose uses GameController information to determine how to act. If it is penalised, then it stands still. If it is not penalised, it determines whether to play as a striker, defender or goalie.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Striker: An offensive position that attempts to score goals by moving towards the ball and kicking to the goal.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Defender: A defensive position that attempts to prevent the opponent from scoring goals by moving towards the ball and kicking it away from the goal if the ball is in our half.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Goalie: A defensive position that attempts to prevent the opponent from scoring goals by staying in the goal area and diving towards the ball if the opponent tries to score.\")), mdx(\"h3\", {\n    \"id\": \"keyboard-walk\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#keyboard-walk\",\n    \"aria-label\": \"keyboard walk permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Keyboard Walk\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/tree/main/module/purpose/KeyboardWalk\"\n  }, \"keyboardwalk module\"), \" is a purpose-level module used for \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"testing\"), \" and \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"demonstration\"), \" purposes. Keyboard walk can use any of the walk engines in the codebase, and acts as an interface for any one of them.\"), mdx(\"p\", null, \"Keyboard walk uses \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"keyboard inputs\"), \" to control the robot. The inputs available are detailed in the following table.\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Command\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Description\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"e\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Toggles the walk on and off. Initially it is off.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"w\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds 0.01 to the walk command x-value. This value is in meters/second.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"s\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds -0.01 to the walk command x-value. This value is in meters/second.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"a\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds 0.01 to the walk command y-value. This value is in meters/second.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"d\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds -0.01 to the walk command y-value. This value is in meters/second.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"z\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds 0.1 to the walk command rotational value. This value is in radians/second.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"x\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds -0.1 to the walk command rotational value. This value is in radians/second.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \",\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Runs the kick with the left foot.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \".\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Runs the kick with the right foot.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"g\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Runs the get up.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"\\u2190\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Head turns to the left.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"\\u2192\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Head turns to the right.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"\\u2191\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Head turns upwards.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"\\u2193\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Head turns downwards.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"r\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Resets keyboardwalk. Head rotation is set to 0. Walk command is set to 0.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"q\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Quits keyboardwalk.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"1\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Step Clap 1.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"2\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Step Clap 2.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"3\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Overhead Thrust Right.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"4\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Overhead Thrust Left.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"5\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Star 1.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"6\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Star 2.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"7\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Crouch 1.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"8\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Performs move Crouch 2.\")))), mdx(\"p\", null, \"To use KeyboardWalk, build the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/blob/main/roles/keyboardwalk.role\"\n  }, \"keyboardwalk role\"), \" and run the binary.\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/blob/main/roles/fake/keyboardwalk.role\"\n  }, mdx(\"strong\", {\n    parentName: \"a\"\n  }, \"fake/keyboardwalk\"), \" role\"), \" uses HardwareSimulator, and is useful for when you don't want to run keyboard walk on the robot.\"), mdx(\"h3\", {\n    \"id\": \"ps3-walk\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#ps3-walk\",\n    \"aria-label\": \"ps3 walk permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"PS3 Walk\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/tree/main/module/purpose/PS3Walk\"\n  }, \"PS3 walk module\"), \" is an interface for \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"testing\"), \" and \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"demonstrating\"), \" the walk and other functionalities using a \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"PS3 controller\"), \".\"), mdx(\"p\", null, \"The module connects to the PS3 controller using USB or bluetooth and reacts based on joystick or button input.\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Command\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Description\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Left Joystick Horizontal\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds rotational speed to the walk command.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Left Joystick Vertical\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Adds x speed to the walk command.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Right Joystick Horizontal\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Changes the head yaw.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Right Joystick Vertical\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Changes the head pitch.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"START\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Toggles walking on/off.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"SELECT\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Toggles locking of the head.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"R2\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Right kick.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"L2\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Left kick.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"DPAD Up\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform Clap move.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"DPAD Down\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform The Robot move.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"DPAD Left\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform Dab move.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"DPAD Right\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform Arm Dangle move.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Triangle\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform Star move.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Circle\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform Raise The Roof move.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Cross\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform Crouch move.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Square\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Perform Wave move.\")))), mdx(\"p\", null, \"To use this module, build the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/blob/main/roles/ps3walk.role\"\n  }, \"PS3Walk role\"), \" and install it on the robot. Ensure the PS3 controller is paired and connected to the right robot. You can set up bluetooth on the robot and pair the controller using the steps below. Once these have been run once, the robot should automatically connect to the controller when both the robot and controller are powered. When you are ready, run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"./ps3walk\"), \" on the robot to begin controlling it.\"), mdx(\"p\", null, \"The robot will initially not perform any action. If you want the robot to stand, pick up the robot and press the start button. It will then move to its standing position and begin looking for walk inputs.\"), mdx(\"h4\", {\n    \"id\": \"setup\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h4\",\n    \"href\": \"#setup\",\n    \"aria-label\": \"setup permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Setup\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Install \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"bluez\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"bluez-utils\"), \", and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"bluez-plugins\"), \" if they have not already been installed:\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"pacman -S --needed bluez bluez-utils bluez-plugins\\n\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Restart the system:\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"reboot now\\n\")), \"This is only necessary if the packages were not previously installed.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Start the bluetooth service:\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"systemctl start bluetooth.service\\n\")))), mdx(\"details\", null, mdx(\"summary\", null, \" Start bluetooth automatically \"), mdx(\"p\", null, \"Bluetooth can be powered on automatically when the system starts. This enables the controllers to\\nconnect without having to run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"systemctl start bluetooth.service\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"bluetoothctl power on\"), \". This\\nis not currently enable by default in the existing installation. Some robots might have this enabled.\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Run\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"systemctl enable bluetooth.service\\n\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Set \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"AutoEnable=true\"), \" in \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/etc/bluetooth/main.conf\"), \":\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"[Policy]\\nAutoEnable=true\\n\")))), mdx(\"p\", null, \"Now, after restarting the robot, and having previously paired the PS3 controller (see below), the PS3 controller\\nwill connect to the robot automatically.\"), mdx(Alert, {\n    type: \"info\",\n    mdxType: \"Alert\"\n  }, mdx(\"p\", null, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ps3walk\"), \" still needs to be started in order to control the robot.\"))), mdx(\"h4\", {\n    \"id\": \"pairing-the-ps3-controller-via-bluetooth\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h4\",\n    \"href\": \"#pairing-the-ps3-controller-via-bluetooth\",\n    \"aria-label\": \"pairing the ps3 controller via bluetooth permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Pairing the PS3 Controller via Bluetooth\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Unplug and power off the PS3 controller.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Run the interactive program \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"bluetoothctl\"), \", and type the following commands:\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"power on\\nscan on\\ndiscoverable on\\n\")), \"If bluetooth is working correctly, you might see other devices appear and disappear.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Turn on the PS3 controller by pressing the middle PS button. The four LEDS should start flashing quickly.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Plug the PS3 controller into the computer with a USB cable.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Type \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"yes\"), \" when the following prompt appears:\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"Authorize service 00001124-0000-1000-8000-00805f9b34fb (yes/no)\\n\")))), mdx(\"p\", null, \"The PS3 controller is now paired. You can unplug it and it will remain connected.\"), mdx(Alert, {\n    type: \"warning\",\n    mdxType: \"Alert\"\n  }, \"The controllers are extremely finicky. Placing them on a table or shaking them can trigger multiple buttons to be pressed!\"), mdx(Alert, {\n    type: \"info\",\n    mdxType: \"Alert\"\n  }, \"The steps are based on the \", mdx(\"a\", {\n    href: \"https://wiki.archlinux.org/title/Gamepad#Pairing_via_Bluetooth\"\n  }, \"Arch Linux controller pairing guide\"), \". If you are having trouble or are connecting a different controller try using their guide as a starting point.\"), mdx(\"h4\", {\n    \"id\": \"verifying-the-ps3-controller-is-functioning-correctly\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h4\",\n    \"href\": \"#verifying-the-ps3-controller-is-functioning-correctly\",\n    \"aria-label\": \"verifying the ps3 controller is functioning correctly permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Verifying the PS3 Controller is functioning correctly.\"), mdx(\"p\", null, \"Verifying the PS3 controller is connected and sending messages is useful for debugging the range, interference, event codes, and making sure the controller is connect to the right robot.\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Install \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"joyutils\"), \":\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"pacman -S --needed joyutils\\n\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"If you are connected via ssh run:\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"jstest --event /dev/input/js0\\n\")), \"Otherwise, if you're connected to a virtual console:\", mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"jstest /dev/input/js0\\n\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Move controller inputs, and press \", mdx(\"kbd\", null, \"Ctrl\"), \" + \", mdx(\"kbd\", null, \"C\"), \" to exit.\")), mdx(\"p\", null, \"Connecting multiple PS3 controllers is possible. The first PS3 controller that connects is located at \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/dev/input/js0\"), \". The second controller that connects is then located at \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/dev/input/js1\"), \".\\nAdditionally, the LEDs on the controllers show which number they are. This holds true regardless of whether the controller is connected over Bluetooth or USB.\"), mdx(\"h3\", {\n    \"id\": \"script-runner\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#script-runner\",\n    \"aria-label\": \"script runner permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Script Runner\"), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/tree/8bfdde1ac3f51764515908dd514e653f6b38cf04/module/purpose/ScriptRunner\"\n  }, \"ScriptRunner\"), \" is a purpose-level module. It takes the name of one or more script files as arguments and attempts to run the scripts. It does not take file paths, only the file name/s of the script/s to execute.\"), mdx(\"p\", null, \"When ScriptRunner is executed, it stores the script file names passed to it as a vector of strings. When the green button on the robot is pushed, the scripts are executed in order of appearance, one after the other. ScriptRunner also provides an option to set a delay before the execution of the first script, as well as a delay between the execution of each script.\"), mdx(\"p\", null, \"An example of using ScriptRunner to run a script called \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Stand.yaml\"), \" is:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"./scriptrunner Stand.yaml\\n\")), mdx(\"h3\", {\n    \"id\": \"script-tuner\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#script-tuner\",\n    \"aria-label\": \"script tuner permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Script Tuner\"), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/tree/0a948978ba5806ee532bc1120a76e9e58c4e6533/module/purpose/ScriptTuner\"\n  }, \"ScriptTuner\"), \" is a purpose-level module. Using a command-line argument, it can either create a new script or open an existing script for editing. It uses \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://en.wikipedia.org/wiki/Curses_(programming_library)\"\n  }, \"curses\"), \" to create a user interface in the terminal. Through this user interface, YAML files are created or edited that specify a script that can then be used by other modules.\"), mdx(\"p\", null, \"A script consists of frames (also called targets) which specify the position of one or more servos at a given time. The ScriptTuner interface allows for stepping through and modifying those frames. When a frame is selected in ScriptTuner, a ServoCommand for that frame will be emitted to the robot. By stepping through multiple frames, the entire script can be played back on the robot, allowing the user to preview changes to the script.\"), mdx(\"p\", null, \"ScriptTuner also allows for \\\"locking\\\" and \\\"unlocking\\\" servos on the robot. When a servo is \\\"locked\\\", its position can only be changed in ScriptTuner. When it is \\\"unlocked\\\", the servo can be moved physically on the robot, which will update the position value in the script. Locking a servo involves emitting a ServoCommand for the current position of the servo. Unlocking the servo involves emitting a ServoCommand with zero torque and gain.\"), mdx(\"p\", null, \"To learn how to use ScriptTuner, read the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/guides/main/tuning-and-running-scripts#script-tuner\"\n  }, \"ScriptTuner guide\"), \".\"), mdx(\"h2\", {\n    \"id\": \"robocup-rules\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#robocup-rules\",\n    \"aria-label\": \"robocup rules permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"RoboCup Rules\"), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://humanoid.robocup.org/wp-content/uploads/RC-HL-2024-Rules.pdf\"\n  }, \"Currently up to date with the 2024 competition rules.\")), mdx(\"p\", null, \"The latest competition rules as well as previous years' rules can be found on the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://humanoid.robocup.org/rules/\"\n  }, \"RoboCup Humanoid League website\"), \".\"), mdx(\"h3\", {\n    \"id\": \"play-states-and-penalty-considerations\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#play-states-and-penalty-considerations\",\n    \"aria-label\": \"play states and penalty considerations permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Play-States and Penalty Considerations\"), mdx(\"p\", null, \"There are unique states in the game where the robots need to behave differently to regular play. For example, if the opposing team has been granted a free kick, we might need to stand still, or move out of the way for the duration of the kick.\"), mdx(\"p\", null, \"All free kicks are taken from the place where the offence occurred, except:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Indirect free kicks to the attacking team for an offence inside the opponent's penalty area\"), \" are taken from the nearest point on the penalty area line which runs parallel to the goal line.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"In the physical competition, \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"free kicks to the defending team in their goal area may be taken from anywhere in that area\")))), mdx(\"p\", null, \"Until the ball is in play all opponents must remain:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"0.75m for KidSize and 1.5m for AdultSize from the ball until it is in play\"), \", unless they are on their own goal line between the goalposts\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Outside the penalty area for free kicks inside the opponent's penalty area\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#planning","title":"Planning","items":[{"url":"#walk-path-planner","title":"Walk Path Planner"},{"url":"#kick-planner","title":"Kick Planner"},{"url":"#look-planner","title":"Look Planner"}]},{"url":"#strategy","title":"Strategy"},{"url":"#purpose","title":"Purpose","items":[{"url":"#soccer","title":"Soccer"},{"url":"#keyboard-walk","title":"Keyboard Walk"},{"url":"#ps3-walk","title":"PS3 Walk"},{"url":"#script-runner","title":"Script Runner"},{"url":"#script-tuner","title":"Script Tuner"}]},{"url":"#robocup-rules","title":"RoboCup Rules","items":[{"url":"#play-states-and-penalty-considerations","title":"Play-States and Penalty Considerations"}]}]},"frontmatter":{"section":"System","chapter":"Subsystems","title":"Behaviour","description":"Behaviour and how it works in the NUbots codebase.","keywords":null,"slug":"/system/subsystems/behaviour","hidden":null},"childNUbookContributions":{"authors":[{"name":"Ysobel Sims","username":"ysims"}],"lastCommit":{"date":"2024-10-06T00:43:48.000Z","hash":"092ed4d086a639f36881702b6d6790285d813e52"}}}},"pageContext":{"mdxPath":"src/book/02-system/02-subsystems/06-behaviour.mdx","id":"18ea7393-f766-5239-a3f8-07a4a1a0e774","next":{"chapter":"Subsystems","title":"Logging","description":"Logging and how it works in the NUbots codebase.","slug":"/system/subsystems/logging","hidden":null},"previous":{"chapter":"Subsystems","title":"Vision","description":"Vision and how it works in the NUbots codebase.","slug":"/system/subsystems/vision","hidden":null},"menu":[{"title":"Team","slug":"/team/introduction","chapters":[{"title":"Introduction","slug":"/team/introduction","pages":[{"title":"Introduction to NUbots","slug":"/team/introduction","hidden":null},{"title":"Areas of Research","slug":"/team/areas-of-research","hidden":null},{"title":"Current Team","slug":"/team/current-members","hidden":null}],"hidden":false},{"title":"Joining the Team","slug":"/team/how-we-work","pages":[{"title":"How We Work","slug":"/team/how-we-work","hidden":null},{"title":"How to Join NUbots","slug":"/team/how-to-join","hidden":null},{"title":"Lab Induction","slug":"/team/induction","hidden":null}],"hidden":false},{"title":"Community","slug":"/team/sponsors","pages":[{"title":"Sponsors","slug":"/team/sponsors","hidden":null},{"title":"Connect","slug":"/team/connect","hidden":null}],"hidden":false},{"title":"History","slug":"/team/history","pages":[{"title":"Team History","slug":"/team/history","hidden":null},{"title":"Past Members","slug":"/team/past-members","hidden":null},{"title":"Publications","slug":"/team/publications","hidden":null}],"hidden":false},{"title":"RoboCup","slug":"/team/robocup","pages":[{"title":"RoboCup","slug":"/team/robocup","hidden":null},{"title":"Resources","slug":"/team/robocup/resources","hidden":null},{"title":"Debriefs","slug":"/team/robocup/debriefs","hidden":null}],"hidden":false}],"hidden":false},{"title":"System","slug":"/system/foundations/overview","chapters":[{"title":"Foundations","slug":"/system/foundations/overview","pages":[{"title":"Overview","slug":"/system/foundations/overview","hidden":null},{"title":"Build System","slug":"/system/foundations/build-system","hidden":null},{"title":"Continuous Integration","slug":"/system/foundations/ci-system","hidden":null},{"title":"NUClear","slug":"/system/foundations/nuclear","hidden":null},{"title":"Mathematics","slug":"/system/foundations/mathematics","hidden":null},{"title":"Configuration and Script System","slug":"/system/foundations/config-script","hidden":null},{"title":"Director","slug":"/system/foundations/director","hidden":null}],"hidden":false},{"title":"Subsystems","slug":"/system/subsystems/input","pages":[{"title":"Input","slug":"/system/subsystems/input","hidden":null},{"title":"Odometry","slug":"/system/subsystems/odometry","hidden":null},{"title":"Localisation","slug":"/system/subsystems/localisation","hidden":null},{"title":"Motion","slug":"/system/subsystems/motion","hidden":null},{"title":"Vision","slug":"/system/subsystems/vision","hidden":null},{"title":"Behaviour","slug":"/system/subsystems/behaviour","hidden":null},{"title":"Logging","slug":"/system/subsystems/logging","hidden":null}],"hidden":false},{"title":"Tools","slug":"/system/tools/nusight","pages":[{"title":"NUsight","slug":"/system/tools/nusight","hidden":null},{"title":"NUbook","slug":"/system/tools/nubook","hidden":null},{"title":"NUpbr","slug":"/system/tools/nupbr","hidden":null},{"title":"NUgan","slug":"/system/tools/nugan","hidden":null},{"title":"System Configuration","slug":"/system/tools/system_configuration","hidden":null},{"title":"NatNet SDK","slug":"/system/tools/natnet_sdk","hidden":null}],"hidden":false},{"title":"Hardware","slug":"/system/hardware/overview","pages":[{"title":"Overview and Specifications","slug":"/system/hardware/overview","hidden":null}],"hidden":false},{"title":"Modules","slug":"/system/modules/actuation/","pages":[{"title":"Actuation","slug":"/system/modules/actuation/","hidden":null},{"title":"Extension","slug":"/system/modules/extension/","hidden":null},{"title":"Input","slug":"/system/modules/input/","hidden":null},{"title":"Localisation","slug":"/system/modules/localisation/","hidden":null},{"title":"Nbs","slug":"/system/modules/nbs/","hidden":null},{"title":"Network","slug":"/system/modules/network/","hidden":null},{"title":"Output","slug":"/system/modules/output/","hidden":null},{"title":"Planning","slug":"/system/modules/planning/","hidden":null},{"title":"Platform","slug":"/system/modules/platform/","hidden":null},{"title":"Purpose","slug":"/system/modules/purpose/","hidden":null},{"title":"Skill","slug":"/system/modules/skill/","hidden":null},{"title":"Strategy","slug":"/system/modules/strategy/","hidden":null},{"title":"Support","slug":"/system/modules/support/","hidden":null},{"title":"Tools","slug":"/system/modules/tools/","hidden":null},{"title":"Vision","slug":"/system/modules/vision/","hidden":null}],"hidden":false}],"hidden":false},{"title":"Guides","slug":"/guides/main/getting-started","chapters":[{"title":"Main Codebase","slug":"/guides/main/getting-started","pages":[{"title":"Getting Started","slug":"/guides/main/getting-started","hidden":null},{"title":"NUClear","slug":"/guides/main/nuclear-tutorial","hidden":null},{"title":"Running and Tuning Scripts","slug":"/guides/main/tuning-and-running-scripts","hidden":null},{"title":"Maintaining Subsystems","slug":"/guides/main/maintaining-subsystems","hidden":null},{"title":"Data Recording and Playback","slug":"/guides/main/data-recording-playback","hidden":null},{"title":"Camera Calibration","slug":"/guides/main/camera-calibration","hidden":null},{"title":"Onboarding Workshop","slug":"/guides/main/onboarding","hidden":null}],"hidden":false},{"title":"Tools","slug":"/guides/tools/nusight-contribution","pages":[{"title":"Contributing to NUsight","slug":"/guides/tools/nusight-contribution","hidden":null},{"title":"Setting Up Webots","slug":"/guides/tools/webots-setup","hidden":null},{"title":"Visual Mesh Getting Started","slug":"/guides/tools/visualmesh","hidden":null},{"title":"Using NUpbr","slug":"/guides/tools/nupbr-guide","hidden":null},{"title":"GameController Setup","slug":"/guides/tools/gamecontroller","hidden":null}],"hidden":false},{"title":"Hardware","slug":"/guides/hardware/working-with-robots","pages":[{"title":"Working with Robots","slug":"/guides/hardware/working-with-robots","hidden":null},{"title":"Flashing a Robot","slug":"/guides/hardware/flashing","hidden":null},{"title":"Servo Setup and Calibration","slug":"/guides/hardware/servo-calibration","hidden":null},{"title":"Batteries","slug":"/guides/hardware/batteries","hidden":null},{"title":"DARwIn Op2 Robot Restoration and Calibration Guide","slug":"/guides/hardware/darwin-op2-guide","hidden":null}],"hidden":false},{"title":"General","slug":"/guides/general/learning-resources","pages":[{"title":"Learning Resources","slug":"/guides/general/learning-resources","hidden":null},{"title":"Contribution Workflow","slug":"/guides/general/contribute","hidden":null},{"title":"RoboCup Setup","slug":"/guides/general/robocup-setup","hidden":null},{"title":"Troubleshooting","slug":"/guides/general/troubleshooting","hidden":null},{"title":"Code Conventions","slug":"/guides/general/code-conventions","hidden":null},{"title":"Glossary","slug":"/guides/general/glossary","hidden":null}],"hidden":false}],"hidden":false},{"title":"Kitchen Sink","slug":"/kitchen-sink/headers","chapters":[{"title":"Markdown","slug":"/kitchen-sink/headers","pages":[{"title":"Headers","slug":"/kitchen-sink/headers","hidden":true},{"title":"Formatting and Paragraphs","slug":"/kitchen-sink/formatting-and-paragraphs","hidden":true},{"title":"Blockquotes","slug":"/kitchen-sink/blockquotes","hidden":true},{"title":"Alerts","slug":"/kitchen-sink/alerts","hidden":true},{"title":"Images","slug":"/kitchen-sink/images","hidden":true},{"title":"Lists","slug":"/kitchen-sink/lists","hidden":true},{"title":"Code","slug":"/kitchen-sink/code","hidden":true},{"title":"Math","slug":"/kitchen-sink/math","hidden":true},{"title":"Table of Contents","slug":"/kitchen-sink/table-of-contents","hidden":true},{"title":"Tables","slug":"/kitchen-sink/tables","hidden":true},{"title":"Collapsible Content","slug":"/kitchen-sink/collapsible","hidden":true},{"title":"GraphViz Diagrams","slug":"/kitchen-sink/graphviz-diagrams","hidden":true},{"title":"Referencing","slug":"/kitchen-sink/referencing","hidden":true}],"hidden":true}],"hidden":true}],"references":null,"hidden":null}},
    "staticQueryHashes": ["3715292327","445096115","466146812"]}