Welcome to ROSMASTER R2 repository
3. Install Rosmaster driver library
3.ROS2 development environment
Theoretically, in ROS2, you only need Notepad to write basic ROS2 programs. However, in order to improve development efficiency, you can install an integrated development environment.
In addition, the terminal and git are also often used, which will be explained here.
1. Use the terminal
In ROS2, you need to use the terminal frequently. We recommend a relatively easy-to-use terminal: Terminator. The effect is as follows:
1.1. Installation
sudo apt install terminator
1.2. Start up
xxxxxxxxxxShortcut key `Ctrl+Alt+T` to start
1.3. Commonly used shortcut keys for Terminator
Regarding operations within the same tag:
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 horizon terminalCtrl+Shift+E //Split terminal verticallyCtrl+Shift+Right //Move splitter bar to right in vertically split terminalCtrl+Shift+Left //Move splitter bar left in vertically split terminalCtrl+Shift+Up //Move splitter bar up in horizontally split terminalCtrl+Shift+Down //Move splitter bar down in horizontally split terminalCtrl+Shift+S //Hide/show scrollbarCtrl+Shift+F //searchCtrl+Shift+C //Copy selected content to clipboardCtrl+Shift+V //Paste the contents of the clipboard hereCtrl+Shift+W //Close current terminalCtrl+Shift+Q //Exit the current window and all terminals in the current window will be closed.Ctrl+Shift+X //Maximize the display of the current terminalCtrl+Shift+Z //Maximize the display of the current terminal and make the font largerCtrl+Shift+N or Ctrl+Tab //Move to next terminalCtrl+Shift+P or Ctrl+Shift+Tab //Crtl+Shift+Tab Move to a previous terminal
Regarding the operations between each label:
xxxxxxxxxxF11 //Full screen switchCtrl+Shift+T //Open a new labelCtrl+PageDown //Move to next tabCtrl+PageUp //Move to previous tabCtrl+Shift+PageDown //Swap the current label with the next labelCtrl+Shift+PageUp //Swap the current label with its previous labelCtrl+Plus (+) //Increase font sizeCtrl+Minus (-) //Reduce font sizeCtrl+Zero (0) //Restore font to original sizeCtrl+Shift+R //Reset terminal statusCtrl+Shift+G //Reset the terminal state and clear the screenSuper+g //Bind all terminals so that one input can be input to all terminalsSuper+Shift+G //UnbindSuper+t //Bind all terminals of the current label, and content entered into one terminal will be automatically entered into other terminals.Super+Shift+T //UnbindCtrl+Shift+I //Open a window. The new window uses the same process as the original window.Super+i //Open a new window. The new window uses a different process than the original window.
2. Use git
2.1. Installation
In daily work, because it is team collaboration and involves version management, git is an unavoidable skill. git is a free and open source distributed version control system. Install git under Ubuntu:
xxxxxxxxxxsudo apt install git
2.2. Git basic operations
Git's job is to create and save snapshots of your project and compare them to subsequent snapshots.
This chapter introduces the commands for creating and submitting snapshots of your project.
The following 6 commands are commonly used in Git: git clone, git push, git add, git commit, git checkout, git pull , we will introduce it in detail later.

Description:
workspace
staging area
local repository
remote repository
A simple operation step:
xxxxxxxxxx$ git init$ git add .$ git commit
git init - Initialize the repository.
git add . - Add files to the staging area.
git commit - Add the contents of the staging area to the repository.
2.2.1. Create repository command
The following table lists the git commands for creating a repository:
| Command | Description |
|---|---|
git init | Initialize the repository |
git clone | Copy a remote repository, which is to download a project. |
2.2.2. Submission and modification
Git's job is to create and save snapshots of your project and compare them to subsequent snapshots.
The following table lists the commands for creating and committing snapshots of your project:
| Command | Description |
|---|---|
git add | Add files to the staging area |
git status | View the current status of the warehouse and display changed files. |
git diff | Compare the differences between files, that is, the differences between the staging area and the work area. |
git commit | Submit the staging area to the local warehouse. |
git reset | Fallback version. |
git rm | Delete files from the staging area and workspace. |
git mv | Move or rename workspace files. |
git checkout | Branch switching. |
git switch (Git 2.23 Version introduction) | Switching branches more clearly. |
git restore (Git 2.23 Version introduction) | Revert or undo changes made to a file. |
2.2.3. Submit log
| Command | Description |
|---|---|
git log | View historical submission records |
git blame <file> | View the historical modification records of the specified file in list form |
2.2.4. Remote operation
| Command | Description |
|---|---|
git remote | Remote warehouse operations |
git fetch | Get the code base from remote |
git pull | Download remote code and merge |
git push | Upload remote code and merge |
For more information about the use of git tools, you can enter: git --help in the terminal to view the help documentation.