--- myst: substitutions: user_credentials: | ```{topic} User credentials USERNAME: `ubuntu` \ PASSWORD: `turtlebot4` ``` --- # Turtlebot 4 - Setup - [Turtlebot4 User Manual](https://turtlebot.github.io/turtlebot4-user-manual/) ## 1. Flashing image to SD card - [Turtlebot4 User Manual: Install latest Raspberry Pi image](https://turtlebot.github.io/turtlebot4-user-manual/setup/basic.html#install-latest-raspberry-pi-image) Download SD card image from: [http://download.ros.org/downloads/turtlebot4/](http://download.ros.org/downloads/turtlebot4/) and flash it with `rpi-imager`. If you need `rpi-imager` install it with: ````{tabs} ```{code-tab} bash {{ arch_based }} sudo pacman -S rpi-imager ``` ```{code-tab} bash {{ debian_based }} TODO ``` ```` ## 2. Connect Turtlebot 4 to WiFi network - [Turtlebot4 User Manual: Connect to the Access Point](https://turtlebot.github.io/turtlebot4-user-manual/setup/basic.html#connect-to-the-access-point) ### 2.1 Connect to Turtlebot 4's WiFi hotspot ```{topic} WiFi Credentials SSID: `Turtlebot4` \ PASSWORD: `Turtlebot4` ``` ### 2.2 SSH into Turtlebot 4 ```bash ssh ubuntu@10.42.0.1 ``` {{ user_credentials }} ### 2.3 Connect Turtlebot 4 to WiFi network Run: ``` bash turtlebot4-setup ``` ```{mermaid} --- name: Turtlebot 4 WiFI Setup --- graph LR turtlebot-setup[**TurtlebotSetup**] -- Wi-Fi Setup --> wifi-setup[**WiFi Setup**] --> wifi-mode{{WiFI Mode: **Client**}}; wifi-setup --> ssid{{SSID: ***wifi_ssid***}}; wifi-setup --> passwod{{Password: ***wifi_password***}}; wifi-setup --> save[**Save**]; turtlebot-setup --> apply[**Apply Settings**] --> yes[**Yes**] ``` Turtlebot 4 is now connected to WiFi network. ## 3. Turtlebot 4 setup ### 3.1 SSH into Turtlebot 4 Run: ```bash ssh ubuntu@ ``` {{ user_credentials }} #### 3.1.1 Find Turtlebot 4's IP Install `arp-scan` if you haven't already: ````{tabs} ```{code-tab} bash {{ arch_based }} sudo pacman -S arp-scan ``` ```{code-tab} bash {{ debian_based }} TODO ``` ```` than run ```bash sudo arp-scan -l ``` Example output: ``` Interface: wlan0, type: EN10MB, MAC: 60:45:2e:14:11:03, IPv4: 192.168.8.247 Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan) 192.168.8.1 94:83:c4:0a:d0:2d GL Technologies (Hong Kong) Limited 192.168.8.109 d8:3a:dd:08:54:aa Raspberry Pi Trading Ltd 192.168.8.166 14:85:7f:58:d0:72 Intel Corporate 5 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.10.0: 256 hosts scanned in 1.955 seconds (130.95 hosts/sec). 4 responded ``` In above example Turtlebot 4's Raspberry Pi is detected with IP `192.168.8.109`. ### 3.2 Update Turtlebot 4 [Turtlebot4 User Manual: Updating the TurtleBot 4](https://turtlebot.github.io/turtlebot4-user-manual/setup/basic.html#updating-the-turtlebot-4) Now it's a good idea to update the Turtlebot 4: ```bash sudo apt update sudo apt -y upgrade ``` ### 3.3 Update Create 3 Access Create 3 user interface: `:8080` Download the **correct** firmware from: [https://iroboteducation.github.io/create3_docs/releases/overview/](https://iroboteducation.github.io/create3_docs/releases/overview/) ```{attention} If you are using **ROS 2 Jazzy**, make sure you install firmware with version `I.*.*`. Firmware versions starting with G or H are not compatible with Jazzy. Unlike previous versions, the Create® 3 firmware `I.*.*` does not support switching between FastDDS and CycloneDDS. Instead there are two separate versions of the firmware available, each supporting one RMW implementation. When installing the firmware on your Create® 3 you must use the firmware that corresponds to the middleware you intend to use. For ROS 2 Jazzy, the default is FastDDS. Unless you have specific reasons for using CycloneDDS, **it is recommended to use the FastDDS firmware on your Create® 3**. ``` Than ugrade the firmware on Create 3. ```{mermaid} graph LR create3[**Create 3 UI**] --> update[**Update**] --> browse[**Browse**] --> firmware{{*select downloaded firmware*}} update --> upload[**Upload file and update**] ``` ## 4. Networking configuration [Turtlebot4 User Manual: Networking](https://turtlebot.github.io/turtlebot4-user-manual/setup/networking.html) ### 4.1 Discovery Server - [Turtlebot4 User Manual: Discovery Server](https://turtlebot.github.io/turtlebot4-user-manual/setup/discovery_server.html) - [Turtlebot4 User Manual: Example configuration](https://turtlebot.github.io/turtlebot4-user-manual/setup/discovery_server.html#example-configuration) #### 4.1.1 Create3 Setup 1. Update to latest firmware: [see 3.3](#33-update-create-3) 2. Factory reset Create 3 ```{mermaid} graph LR create3[**Create 3 UI**] --> about[**About**] --> factory-reset[**Factory reset URL**
at the end of the page] ``` #### 4.1.2 Raspberry Pi Setup SSH into the Turtlebot 4 and run: ```bash turtlebot4-setup ``` ```{mermaid} --- name: Turtlebot 4 WiFI Setup --- graph LR turtlebot-setup[**TurtlebotSetup**] -- ROS Setup --> ros-setup[**ROS Setup**] -- Bash Setup --> bash-setup[**Bash Setup**] --> robot-namespace{{ROBOT_NAMESPACE:
***robot_namespace***}} bash-setup --> save[**Save**] ros-setup -- Discovery Server --> discovery-server[**Discovery Server**] --> enabled{{Enabled: **True**}}; discovery-server --> server-id{{Onboard Server
Server ID:
***robot_id***}} discovery-server --> save2[**Save**]; turtlebot-setup --> apply[**Apply Settings**] --> yes[**Yes**]; turtlebot-setup --> exit[**Exit**] ``` than run: ```bash turtlebot4-source ``` and ```bash turtlebot4-daemon-restart ``` #### 4.1.3 PC Setup Run: ```bash wget -qO - https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/jazzy/turtlebot4_discovery/configure_discovery.sh | bash <(cat) ` - **Discovery Server ID**: `` (selected in [step 4.1.2](#412-raspberry-pi-setup)) - **Discovery Server IP**: `` - **Discovery Server Port**: leave default When finished run: ```bash source ~/.bashrc ros2 daemon stop; ros2 daemon start ``` and test configuration with: ```bash ros2 topic list ```