> For the complete documentation index, see [llms.txt](https://docs.hello-robot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hello-robot.com/stretch4_install/docs/contributing.md).

# Contributing to Stretch Install

Thank you for considering contributing to this repository. Stretch Install houses bash scripts and tutorials that enable users to setup/configure their robots. This guide explains the layout of this repo and how best to make and test changes.

## Repo Layout

* `README.md` & `LICENSE.md` - includes info about the repo and a table of tutorials available
* `stretch_new_*_install.sh` - high level scripts meant to be run by the user
* `factory/` - subscripts and assets not meant to be run by the user
  * `24.04/` - subscripts and assets specific to performing a Ubuntu 24.04 software install
    * `stretch_initial_setup.sh` - a bunch of checks and initial setup that are run before performing a robot install
    * `stretch_install_*.sh` - helper scripts that install a specific set of packages
    * `stretch_create_*_workspace.sh` - creates a ROS/ROS2 workspace
    * `stretch_ros*.repos` - the ROS packages that are included and compiled in the ROS workspace by the `stretch_create_*_workspace.sh` script
    * `hello_robot_*.desktop` - autostarts programs to run when the robot boots up
  * `<>.04/` - Ubuntu <>.04 software install related subscripts/assets. Similar in layout to 24.04/
* `docs/` - contains tutorials for using the scripts in this repo

Once you're ready to make changes to this repo, you can [fork it on Github](https://github.com/hello-robot/stretch_docs/fork).

## Contributing to the tutorials

The tutorials in the `docs/` folder are markdown files. You can make additions or changes to the source markdown files and see the changes reflected live on Github.

## Contributing to the installation scripts

If you are looking to change scripts/assets of an existing software installation (e.g. Ubuntu 24.04), look within the `factory/<>.04/` directory and make changes to the appriopriate files. If you're looking to add support for a new Ubuntu distro (e.g. Ubuntu 25.04), create `factory/25.04` with assets from a previous installation and tweak the scripts until they works correctly for the Ubuntu distro you are targeting. Then, edit the high level scripts (e.g. `stretch_new_*_install.sh`) to call your distro's specific assets correctly. Ensuring that the tutorials in the `docs/` work for your new distro is a good way to ensure that your `factory/<>.04/` directory works correctly. Since bash scripts change behavior based on the underlying system, it can be helpful to use containers to create reproducible behaviors while you're developing support for the new distro. [Multipass](https://multipass.run/install) works well on Ubuntu systems. You can create a new container emulating any Ubuntu distro using the command:

```bash
multipass launch -c 6 -d 30G -m 16G -n <container-name> 25.04
```

Swap `25.04` in the above command with the distro you're targeting. The above command creates a containers with 30GB disk space, 16GB swap, 6 cores, and the name `<container-name>`. We've found that at least 16GB swap and 30GB disk space is needed for the Ubuntu 24.04 installation.

Then, you can access the shell of your new container using:

```bash
multipass shell <container-name>
```

Other helpful multipass subcommand include `transfer`, which allows you to transfer files to the container, and `delete`, which allows you to delete the container. See the [multipass docs](https://multipass.run/docs) for more details.

## Filing a Pull Request

Once your changes are committed to your fork, you can [open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) towards the Stretch Install main branch. A member of Hello Robot's software team will review your new PR and get it merged and available for all Stretch users.

***

All materials are Copyright 2020-2026 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hello-robot.com/stretch4_install/docs/contributing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
