Welcome to Raspberry Pi 5 repository
3.ROS2 development environment
ROS2 Integrated Development Environment Setup
If you are using the factory image we provided, manual installation and configuration are not required.
In theory, you can write basic ROS2 programs with just a text editor in ROS2. However, to improve development efficiency, you can install the integrated development environment VSCode.
1. Using VSCode Development Environment
Search for VSCode in your browser, download the installation package for your platform, and install it.

Install commonly used plugins to help improve work efficiency.



2. Using the Terminal
In ROS2, you need to use the terminal frequently. We recommend a relatively good terminal: Terminator. The effect is as follows:

2.1 Installation
sudo apt install terminator2.2 Launch
xxxxxxxxxxPress `Ctrl+Alt+T` to launch2.3 Common Terminator Shortcuts
Operations within the same tab:
xxxxxxxxxxAlt+Up //Move to the terminal aboveAlt+Down //Move to the terminal belowAlt+Left //Move to the terminal on the leftAlt+Right //Move to the terminal on the rightCtrl+Shift+O //Split terminal horizontallyCtrl+Shift+E //Split terminal verticallyCtrl+Shift+Right //Move the split bar to the right in vertically split terminalsCtrl+Shift+Left //Move the split bar to the left in vertically split terminalsCtrl+Shift+Up //Move the split bar up in horizontally split terminalsCtrl+Shift+Down //Move the split bar down in horizontally split terminalsCtrl+Shift+S //Hide/show scrollbarCtrl+Shift+F //SearchCtrl+Shift+C //Copy selected content to clipboardCtrl+Shift+V //Paste clipboard content hereCtrl+Shift+W //Close current terminalCtrl+Shift+Q //Exit current window, all terminals in the current window will be closedCtrl+Shift+X //Maximize current terminalCtrl+Shift+Z //Maximize current terminal and enlarge fontCtrl+Shift+N or Ctrl+Tab //Move to next terminalCtrl+Shift+P or Ctrl+Shift+Tab //Move to previous terminalOperations between tabs:
xxxxxxxxxxF11 //Toggle fullscreenCtrl+Shift+T //Open a new tabCtrl+PageDown //Move to next tabCtrl+PageUp //Move to previous tabCtrl+Shift+PageDown //Swap current tab with the next tabCtrl+Shift+PageUp //Swap current tab with the previous tabCtrl+Plus (+) //Increase font sizeCtrl+Minus (-) //Decrease font sizeCtrl+Zero (0) //Restore font to original sizeCtrl+Shift+R //Reset terminal stateCtrl+Shift+G //Reset terminal state and clear screenSuper+g //Bind all terminals so that input goes to all terminalsSuper+Shift+G //UnbindSuper+t //Bind all terminals in the current tab, content entered in one terminal will automatically enter other terminalsSuper+Shift+T //UnbindCtrl+Shift+I //Open a new window, the new window uses the same process as the original windowSuper+i //Open a new window, the new window uses a different process from the original window
3. Using Git
3.1 Installation
In daily work, because it is team collaboration and involves version control, git is an indispensable skill. Git is a free and open-source distributed version control system. To install git on Ubuntu:
xxxxxxxxxxsudo apt install git3.2 Git Basic Operations
Git's job is to create and save snapshots of your project and compare them with subsequent snapshots.
This chapter will introduce commands for creating and committing snapshots of your project.
The six most commonly used Git commands are: git clone, git push, git add, git commit, git checkout, git pull. We will introduce them in detail later.

Explanation:
workspace: Working area
staging area: Staging area/buffer area
local repository: Version library or local repository
remote repository: Remote repository
A simple operation steps:
xxxxxxxxxx$ git init$ git add .$ git commitgit init - Initialize repository.
git add . - Add files to staging area.
git commit - Add staging area content to repository.
3.2.1 Create Repository Commands
The following table lists Git commands for creating repositories:
| Command | Description |
|---|---|
git init | Initialize repository |
git clone | Copy a remote repository, i.e., download a project. |
3.2.2 Commit and Modify
Git's job is to create and save snapshots of your project and compare them with subsequent snapshots.
The following table lists commands for creating and committing snapshots of your project:
| Command | Description |
|---|---|
git add | Add files to staging area |
git status | View current status of repository, showing changed files. |
git diff | Compare differences between files, i.e., differences between staging area and working area. |
git commit | Commit staging area to local repository. |
git reset | Revert to previous version. |
git rm | Delete files from staging area and working area. |
git mv | Move or rename files in working area. |
git checkout | Branch switching. |
git switch (Git 2.23 and later) | Switch branches more clearly. |
git restore (Git 2.23 and later) | Restore or undo file changes. |
3.2.3 Commit Log
| Command | Description |
|---|---|
git log | View historical commit records |
git blame <file> | View historical modification records of specified file in list format |
3.2.4 Remote Operations
| Command | Description |
|---|---|
git remote | Remote repository operations |
git fetch | Fetch code from remote |
git pull | Download remote code and merge |
git push | Upload remote code and merge |
For more information on using the git tool, enter git --help in the terminal to view the help documentation.