{
    "componentChunkName": "component---src-components-page-template-jsx",
    "path": "/guides/main/tuning-and-running-scripts",
    "result": {"data":{"mdx":{"id":"560f01c3-8833-595e-9ec7-215c85e460ef","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\": \"Guides\",\n  \"chapter\": \"Main Codebase\",\n  \"title\": \"Running and Tuning Scripts\",\n  \"description\": \"How to tune and run scripts.\",\n  \"slug\": \"/guides/main/tuning-and-running-scripts\",\n  \"authors\": [\"Ysobel Sims (@ysims)\"]\n};\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, \"Scripts are static motions for the robot. By static, we mean they are preconfigured motions that won't change at runtime. They specify what joint angles to move to and how long the robot should take to go to those joint angles. For example, standing up is a small script telling the robot to move its joints to the stand position over one second. There can be many of these position specifications in a row to make the robot do more complex movements like getting up or kicking.\"), mdx(\"p\", null, \"Scripts are run using the script utility and the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/system/foundations/director\"\n  }, \"Director system\"), \". The script utility will convert a specified script yaml file into a \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/system/subsystems/motion#actuation\"\n  }, \"Sequence Task message\"), \". It takes each joint position and time from the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".yaml\"), \" file and adds these frames to the Sequence of servo targets. The Sequence Provider will request a Director Task for each Group in its Sequence, and will only progress to the next Group when the previous has completed.\"), mdx(\"p\", null, \"More information on the script system is on the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/system/subsystems/motion#scripts\"\n  }, \"Motion\"), \" page. Information on Script Runner and Script Tuner is on the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/system/subsystems/behaviour#script-runner\"\n  }, \"Behaviour\"), \" page.\"), mdx(\"h2\", {\n    \"id\": \"script-runner\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\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, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"scriptrunner\"), \" command will run a script. It is used as follows:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"./scriptrunner <script_name>\\n\")), mdx(\"p\", null, \"Where \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<script_name>\"), \" is the name of the script you want to run, such as \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Stand.yaml\"), \". All scripts can be found in the NUbots repository under \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/shared/utility/skill/scripts\"), \".\"), mdx(\"p\", null, \"The script you are running needs to be on the robot in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/scripts/\"), \" folder. These scripts can be robot specific. For example, you could have a stand script specifically for the NUgus 1 robot stored in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/scripts/nugus1/Stand.yaml\"), \". When you run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"./scriptrunner Stand.yaml\"), \" on NUgus 1, the ScriptEngine will first look for the robot-specific \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Stand.yaml\"), \" in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/scripts/nugus1/\"), \" folder. If found, it will execute it. If not, it will look for a platform-specific \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Stand.yaml\"), \" in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/scripts/nugus/\"), \" folder, which it will execute if found. Otherwise, it will look for a more general \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Stand.yaml\"), \" in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/scripts/\"), \" folder.\"), mdx(\"p\", null, \"More on the script system can be found on the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/system/foundations/config-script\"\n  }, \"Configuration and Script System page\"), \".\"), mdx(\"h2\", {\n    \"id\": \"script-tuner\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\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, \"Script tuner is a tool that can be used to create and modify scripts. To use script tuner, run:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"./scripttuner <script_path>\\n\")), mdx(\"p\", null, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<script_path>\"), \" is the path to the script you want to tune, such as \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"scripts/nugus/Stand.yaml\"), \". The path can be to an existing script, if you want to edit it, or to a script that does not exist yet if you want to create a new script.\"), mdx(\"p\", null, \"Running a command like the above will open the following interface, which will enable you to tune the script:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"-----------------------------------Script Tuner-----------------------------------\\n\\nScript: scripts/nugus2/walk.yaml\\nFrames: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28\\nDuration:  3000\\n-\\n\\n\\nU Head Pan              Angle:  -.--- Gain: ---.-\\nU Head Tilt             Angle:  -.--- Gain: ---.-\\nL Right Shoulder Pitch  Angle: +1.963 Gain:  20.0\\nL Left Shoulder Pitch   Angle: +1.963 Gain:  20.0\\nL Right Shoulder Roll   Angle: -0.124 Gain:  20.0\\nL Left Shoulder Roll    Angle: +0.124 Gain:  20.0\\nL Right Elbow           Angle: -2.443 Gain:  25.0\\nL Left Elbow            Angle: -2.443 Gain:  25.0\\nL Right Hip Yaw         Angle: +0.030 Gain:  30.0\\nL Left Hip Yaw          Angle: +0.030 Gain:  30.0\\nL Right Hip Roll        Angle: -0.063 Gain:  30.0\\nL Left Hip Roll         Angle: +0.063 Gain:  30.0\\nL Right Hip Pitch       Angle: -0.204 Gain:  30.0\\nL Left Hip Pitch        Angle: -0.204 Gain:  30.0\\nL Right Knee            Angle: +0.257 Gain:  30.0\\nL Left Knee             Angle: +0.257 Gain:  30.0\\nL Right Ankle Pitch     Angle: -0.239 Gain:  30.0\\nL Left Ankle Pitch      Angle: -0.239 Gain:  30.0\\nL Right Ankle Roll      Angle: +0.060 Gain:  30.0\\nL Left Ankle Roll       Angle: -0.067 Gain:  30.0\\n\\nCommands\\n, Left a frame  N New Frame        Lock/Unlock   J Jump to Frame P play\\n. Right a frame I Delete a Frame T Edit Duration G Change Gains  S Save\\n\\nType :help for a full list of commands\\n----------------------------------------------------------------------------------\\n\")), mdx(\"p\", null, \"The first line shows the name and path of the script you are creating or editing.\"), mdx(\"p\", null, \"The second line specifies the number of frames and the current frame, which is highlighted. Each frame specifies different joint (i.e. servo) positions, and when these frames are combined they result in a motion.\"), mdx(\"p\", null, \"The next line is the duration. This determines how long the robot will take to move to the servo positions you have specified. This is measured in milliseconds.\"), mdx(\"p\", null, \"The next section is a table that shows the angle and gain for each servo for that frame.\"), mdx(\"p\", null, \"The bottom of the interface shows what commands are available. It does not show all the commands. All commands can be viewed by typing \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \":help\"), \" and pressing \", mdx(\"kbd\", null, \"Enter\"), \". Note that the letters should be pressed in UPPERCASE.\"), 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, \",\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Moves to the frame that is to the left of the currently selected frame. When moving to the frame, the robot's joints will move to the joint positions for that frame.\")), 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  }, \"Moves to the frame that is right of the currently selected frame. When moving to the frame, the robot's joints will move to the joint positions for that frame.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"N\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Creates a new frame after the currently selected frame. This frame will be a duplicate of the selected frame. It will be added in after the currently selected frame, and the selected frame will not change.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"I\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Deletes the currently selected frame. The frame after the deleted frame will be selected, if there's one. Otherwise the one before will be selected.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"space\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Toggles locking and unlocking of servos. When a servo is locked, you will not be able to manually move its joint on the robot, and the angle it is at will be stored in the table on the script tuner interface. When it is unlocked, you are able to freely move that joint on the robot to adjust the angle of the joint for that frame. Space bar can be pressed to edit any field that is editable.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"T\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Edits the duration that the current frame plays for, in milliseconds. After pressing this key, type the duration and press \", mdx(\"kbd\", null, \"Enter\"), \" to submit.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"J\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Jumps to a specified frame. After pressing this key, type the frame number you want to jump to and then press \", mdx(\"kbd\", null, \"Enter\"), \".\")), 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  }, \"Opens the interface for editing the gain of the entire script or frame. Provides a quick way to change all servo gains, only the upper body gains (arms and head), or only lower body gains (legs) at the same time. The change can be applied to the entire script or to a particular frame. Press \", mdx(\"kbd\", null, \"X\"), \" to exit the edit gain interface when done.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"P\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Plays the script from the first frame to the last frame.\")), 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  }, \"Saves the new script or saves the edited script.\")), 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  }, \"Saves the script with a particular name (equivalent to \\\"save as\\\"). After pressing this key, type the name of the script and press \", mdx(\"kbd\", null, \"Enter\"), \".\")), 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  }, \"Manually refreshes view. Useful if for some reason the view gets stuck.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"M\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Mirrors the script in the sagittal plane.\")), 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  }, \"Exits the help view or exits the gain editing interface.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \"CTRL\"), \"+\", mdx(\"kbd\", null, \"C\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Quits script tuner.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"kbd\", null, \":help\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Lists all commands that can be used in script tuner.\")))), mdx(\"h2\", {\n    \"id\": \"list-of-scripts\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#list-of-scripts\",\n    \"aria-label\": \"list of scripts 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  }))), \"List of Scripts\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Script Name\"), 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(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"DiveLeft.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot stretches its arm out to the left and moves its left leg so that it will dive to the left.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"DiveRight.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot stretches its arm out to the right and moves its right leg so that it will dive to the right.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"KickLeft.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot kicks with its left foot.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"KickRight.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot kicks with its right foot.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"NodYes.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot nods its head.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Relax.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot relaxes all of its joints. Be prepared to hold it if it's standing, as it will fall over.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"RollOverFront.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot rolls from its back onto its front.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Stand.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot moves into a standing position.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"StandUpBack.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot gets up from its back and moves into a standing position.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"StandUpFront.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot gets up from its front and moves into a standing position.\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"inlineCode\", {\n    parentName: \"td\"\n  }, \"Zombie.yaml\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The robot moves into a standing zombie position, with arms straight out.\")))), mdx(\"h2\", {\n    \"id\": \"modifying-and-adding-scripts\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#modifying-and-adding-scripts\",\n    \"aria-label\": \"modifying and adding scripts 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  }))), \"Modifying and Adding Scripts\"), mdx(\"p\", null, \"When installing NUbots code onto a robot for tuning scripts, ensure you are using \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/system/foundations/build-system#install\"\n  }, \"the correct flag for installing configuration files\"), \", depending on whether you want to overwrite existing scripts on the robot, or not. Ensure that you have enabled the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"scripttuner\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"scriptrunner\"), \" binaries by turning \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"scripttuner.role\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"scriptrunner.role\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ON\"), \" in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"./b configure -i\"), \", before building and installing.\"), mdx(\"p\", null, \"Use script tuner as detailed above to make or edit your script. It is a good idea to have one person using script tuner and another person holding the robot and moving the joints to new positions. Wait a few seconds after saving before you close the script, to allow it time to finish saving.\"), mdx(\"p\", null, \"When you have finished making or editing your script, copy it from the robot to your computer using\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"scp nubots@<address>:<path_to_script> <path_on_your_computer>\\n\")), mdx(\"p\", null, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<address>\"), \" is the address of the robot, such as \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"10.1.1.1\"), \" for NUgus 1. \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<path_to_script>\"), \" is the path to the script. \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<path_on_your_computer>\"), \" is the path you want to copy the script to on your computer. Run this command on your computer.\"), mdx(\"p\", null, \"After you copy the script to your computer, you should commit it to a new branch and make a pull request to merge it into the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"main\"), \" branch on GitHub; unless the changes are not suitable to keep, in which case you can discard them. For information on Git and GitHub visit the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/guides/general/git\"\n  }, \"Git guide\"), \".\"));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#script-runner","title":"Script Runner"},{"url":"#script-tuner","title":"Script Tuner"},{"url":"#list-of-scripts","title":"List of Scripts"},{"url":"#modifying-and-adding-scripts","title":"Modifying and Adding Scripts"}]},"frontmatter":{"section":"Guides","chapter":"Main Codebase","title":"Running and Tuning Scripts","description":"How to tune and run scripts.","keywords":null,"slug":"/guides/main/tuning-and-running-scripts","hidden":null},"childNUbookContributions":{"authors":[{"name":"Ysobel Sims","username":"ysims"}],"lastCommit":{"date":"2023-10-18T23:43:10.000Z","hash":"559b1787f3947eddcd2d66c06d46c2390ac4a11c"}}}},"pageContext":{"mdxPath":"src/book/03-guides/01-main-codebase/03-tuning-and-running-scripts.mdx","id":"560f01c3-8833-595e-9ec7-215c85e460ef","next":{"chapter":"Main Codebase","title":"Maintaining Subsystems","description":"How to maintain subsystems within the main codebase.","slug":"/guides/main/maintaining-subsystems","hidden":null},"previous":{"chapter":"Main Codebase","title":"NUClear","description":"Creating a NUClear module.","slug":"/guides/main/nuclear-tutorial","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"]}