|
|
Lab 1: Introduction to ROS2 and Turtlebot4
|
|
|
==========================================
|
|
|
|
|
|
This lab aims to introduce the basic concepts of ROS2 and its main tools. As part of the lab, you will also be introduced to the simulated environment: Turtlebot4.
|
|
|
|
|
|
Introduction
|
|
|
------------
|
|
|
|
|
|
_The Robot Operating System (ROS) is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behaviors across a wide variety of robotic platforms_. More information can be found on the [official website](https://www.ros.org/). It is commonly used by many robots in research and industry. ROS can transparently interact with real hardware or with a simulator.
|
|
|
|
|
|
Running
|
|
|
-------
|
|
|
|
|
|
**On Campus**
|
|
|
|
|
|
ROS is already installed on IDA computers, you can find it in the directories ```/opt/ros/galactic```, ```/usr``` and ```/courses/TDDE05/software```.
|
|
|
|
|
|
**ThinLinc**
|
|
|
|
|
|
Running on personal computers is currently not supported. However, it is possible to use ThinLinc to remotely access IDA's computers.
|
|
|
To use ThinLinc, follow the installation instructions at http://www.cendio.com/thinlinc/download and connect to the IDA server: ```thinlinc.edu.liu.se```.
|
|
|
|
|
|
ROS
|
|
|
---
|
|
|
|
|
|

|
|
|
|
|
|
ROS is a framework composed of communication middleware and a set of modules providing different functionalities for robots.
|
|
|
|
|
|
**Middleware:** With ROS, the various algorithms, interfaces to hardware, and simulators all run in different processes. ROS includes communication libraries for various programming languages: C++ ([rclcpp](https://index.ros.org/p/rclcpp/)) or Python ([rclpy](https://index.ros.org/p/rclpy/)).
|
|
|
There are libraries for more programming languages, but they are not as well supported, and it is recommended that you stick to C++ and Python for this course.
|
|
|
|
|
|
ROS programs mainly communicate through the use of topics.
|
|
|
ROS topics follow a multi-publishers/multi-subscribers pattern: ROS programs subscribe to individual topics and they will then receive the messages that are published by other programs on the topic.
|
|
|
Topics are associated with a specific type of a ROS message (examples of standard messages can be found at [std_msgs](https://index.ros.org/p/std_msgs/), it is possible to create custom messages to suit your needs).
|
|
|
|
|
|
In addition to topics, ROS programs can offer _service calls_, which is the ROS implementation of Remote Procedure Calls (RPC).
|
|
|
|
|
|
**Packaging system:** ROS also provides a standard method for defining software packages, using either the [CMake](cmake.org/) or [setupttools](https://setuptools.pypa.io/en/latest/setuptools.html) build systems. This package system allows you to easily install any ROS package.
|
|
|
|
|
|
Turtlebot4
|
|
|
----------
|
|
|
|
|
|

|
|
|
|
|
|
_TurtleBot 4_ is the next-generation of the world’s most popular open-source robotics platform for education and research, offering better computing power, better sensors, and a world-class user experience at an affordable price point.
|
|
|
|
|
|
For this course, the _Turtlebot 4_ is simulated, using a 2D simulator called _simple simulator_, which can run well in ThinLinc or the lab computers. The official project uses a 3D simulator, [https://gazebosim.org/](Gazebo), which works poorly on the IDA's computers.
|
|
|
|
|
|
Setup the environment
|
|
|
---------------------
|
|
|
|
|
|
### First, you will need to add the following to your ```.bashrc``` file:
|
|
|
|
|
|
```bash
|
|
|
alias tdde05-start=". /courses/TDDE05/software/bin/tdde05-start.sh"
|
|
|
```
|
|
|
|
|
|
To edit your ```.bashrc``` file, you can use the following command in a terminal:
|
|
|
|
|
|
```bash
|
|
|
kate ~/.bashrc
|
|
|
```
|
|
|
|
|
|
### You need to set your ROS Domain id
|
|
|
|
|
|
To avoid conflict with other ROS2 users, you need to set a unique ROS Domain id. You can do it using the following commands:
|
|
|
|
|
|
```bash
|
|
|
mkdir -p $HOME/TDDE05
|
|
|
kate $HOME/TDDE05/.domain_id
|
|
|
```
|
|
|
|
|
|
In the `.domain_id` file set your group number. For example, if you are in group 12, the file should contain ``12``.
|
|
|
|
|
|
### Every time you open a new terminal, before issuing a ROS command, you will need to run:
|
|
|
|
|
|
```bash
|
|
|
tdde05-start
|
|
|
```
|
|
|
|
|
|
Starting the simulator
|
|
|
-------------------
|
|
|
|
|
|
* To start the robot platform with the simple simulator:
|
|
|
|
|
|
```bash
|
|
|
ros2 launch air_bringup turtle.launch.py
|
|
|
```
|
|
|
|
|
|
If all goes well, the following image should appear:
|
|
|
|
|
|

|
|
|
|
|
|
The _red_ dot is the robot. The black squares are obstacles, and the dots with numbers are semantic objects used in another lab assignment.
|
|
|
|
|
|
Visualization
|
|
|
-------------
|
|
|
|
|
|
The robot is ready to accept commands, but the visualization by the simulator is very limited. However, ROS provides a good visualization tool called ```RViz```. To start it, run the following command in a terminal:
|
|
|
|
|
|
```bash
|
|
|
rviz2
|
|
|
```
|
|
|
|
|
|
It should start with a default configuration of the tool and look like the following:
|
|
|
|
|
|

|
|
|
|
|
|
We can add visualization using the ```add``` button. It should show a display like this:
|
|
|
|
|
|

|
|
|
|
|
|
The first thing to add is called ```TF```, which shows all the coordinate frames used by the robot. If too many frames are shown, deselect all of them (uncheck ```all enabled```). Then select ```odom``` and base link. It should show the origin of the world and the current position of the robot.
|
|
|
|
|
|
Then, add a 3D model of the robot, using the ```RobotModel``` visualization. In the `Displays` panels, look for `RobotModel` you need to write ```/robot_description``` for ```Description Topic```.
|
|
|
|
|
|
Then, add the map used by the robot to navigate: you can use the ```map``` visualization and then select the ```/map``` topic.
|
|
|
|
|
|
This should show a window that looks like this:
|
|
|
|
|
|

|
|
|
|
|
|
You can save your Rviz configuration from the file menu.
|
|
|
|
|
|
Sending commands to the robot
|
|
|
-------------------------
|
|
|
|
|
|
The robot is ready to accept commands. The first commands you can send to the robot are for docking and undocking, in a terminal:
|
|
|
|
|
|
```bash
|
|
|
ros2 action send_goal /dock irobot_create_msgs/action/DockServo {}
|
|
|
ros2 action send_goal /undock irobot_create_msgs/action/Undock {}
|
|
|
```
|
|
|
|
|
|
The following action can be used to make the robot move forward with a given velocity:
|
|
|
|
|
|
```bash
|
|
|
ros2 action send_goal /drive_distance irobot_create_msgs/action/DriveDistance "{ distance: 3.5, max_translation_speed: 0.3 }"
|
|
|
```
|
|
|
|
|
|
The following action can be used to move the robot to a specific position:
|
|
|
|
|
|
```bash
|
|
|
ros2 action send_goal /navigate_to_position irobot_create_msgs/action/NavigateToPosition "{achieve_goal_heading: true,goal_pose:{pose:{position:{x: 3, y: 4,z: 0.0}, orientation:{x: 0.0,y: 0.0, z: 0.0, w: 1.0}}}}"
|
|
|
```
|
|
|
|
|
|
Managing topics from the command line
|
|
|
-------------------------------------
|
|
|
|
|
|
The main communication medium for ROS is through the use of _topics_. Topics have a name and a type and follow a publisher-subscriber pattern. You can use the following command to list all available topics:
|
|
|
|
|
|
|
|
|
```bash
|
|
|
ros2 topic list
|
|
|
```
|
|
|
|
|
|
If you want detailed information about a topic, i.e. to know the type and which nodes are subscribed/publishing use the following parameters with the topic name at the end. For example:
|
|
|
|
|
|
```bash
|
|
|
ros2 topic info -v /cmd_vel
|
|
|
```
|
|
|
|
|
|
You can listen to a topic from the command line to get the values:
|
|
|
|
|
|
```bash
|
|
|
ros2 topic echo /odom
|
|
|
```
|
|
|
|
|
|
To check what is happening, run one of the commands in the previous section, and you should see the position of the robot in the terminal.
|
|
|
|
|
|
And finally, you can publish on a topic:
|
|
|
|
|
|
```bash
|
|
|
ros2 topic pub --rate 100 /cmd_vel geometry_msgs/msg/Twist "{ linear: { x: 0.4, y: 0.0, z: 0.0}, angular: { x: 0.0, y: 0.0, z: 0.3 } }"
|
|
|
```
|
|
|
|
|
|
After that command, you should be able to see the robot move in a circle in RViz or the simulator window. You should also be able to see the position changes when listening to ```/odom``` topic.
|
|
|
|
|
|
RQT
|
|
|
---
|
|
|
|
|
|
An alternative approach to using the command line for listening or publishing on topics is to use a tool called RQT. You can start it from the command line simply with:
|
|
|
|
|
|
```bash
|
|
|
rqt
|
|
|
```
|
|
|
|
|
|
Then in the interface, from the plugin menu, add the following:
|
|
|
|
|
|
* ```topics > message publisher```
|
|
|
* ```topics > topic monitor```
|
|
|
* ```robot tools > robot steering``` you can then set the topic to ```/cmd_vel```.
|
|
|
|
|
|
The window should look like this:
|
|
|
|
|
|

|
|
|
|
|
|
If you check the ```/odom``` in the topic monitor, you can see it change. In the message publisher, you can add new topics and set the value to publish. Try to add ```/cmd_vel``` and publish the velocity. A more convenient alternative to controlling the velocity is to use the robot's steering panel (note that the robot does not like to move backward).
|
|
|
|
|
|
You can also use rqt to plot topic values. Add a plot with ```Visualization > Plot```. You can then add ```/diffdrive_controller/cmd_vel_unstamped/linear/x``` and ```/diffdrive_controller/cmd_vel_unstamped/angular/z```
|
|
|
|
|
|
You should see something like this:
|
|
|
|
|
|

|
|
|
|
|
|
screen
|
|
|
------
|
|
|
|
|
|
As you can see, we ended up starting a lot of commands from the terminal. It can be annoying to have so many windows and terminals open, a solution is to use [GNU Screen](https://www.gnu.org/software/screen/), which allows to start all the processes in a single terminal window.
|
|
|
|
|
|
The easiest way to use it is to create a screen configuration file (you can call it ```screen.tdde05```):
|
|
|
|
|
|
```
|
|
|
# Configuration
|
|
|
deflogin on
|
|
|
autodetach off
|
|
|
|
|
|
caption always
|
|
|
|
|
|
bindkey ^w screen
|
|
|
bindkey ^p prev
|
|
|
bindkey ^n next
|
|
|
bindkey ^x quit
|
|
|
bind q quit
|
|
|
bindkey ^l windowlist
|
|
|
bindkey ^e copy
|
|
|
|
|
|
# Pre-defined tabs
|
|
|
|
|
|
screen 0
|
|
|
title "simple sim"
|
|
|
stuff "tdde05-start; ros2 launch air_bringup turtle.launch.py\015"
|
|
|
|
|
|
screen 2
|
|
|
title "rviz"
|
|
|
stuff "tdde05-start; rviz2\015"
|
|
|
|
|
|
screen 3
|
|
|
title "rqt"
|
|
|
stuff "tdde05-start; rqt\015"
|
|
|
```
|
|
|
|
|
|
You can then start it from a terminal with ```screen -c screen.tdde05```.
|
|
|
|
|
|
The following shortkeys can be used:
|
|
|
|
|
|
* ```ctrl+w``` to create a new command tab
|
|
|
* ```ctrl+p``` to navigate to the previous tab
|
|
|
* ```ctrl+n``` to navigate to the next tab
|
|
|
* ```ctrl+x``` to quit
|
|
|
* ```ctrl+l``` to show the list of tabs
|
|
|
* ```ctrl+e``` to scroll in the log, using up/down arrow (page up/down works as well), press \verb|ESC| to stop scrolling
|
|
|
\end{itemize}
|
|
|
|
|
|
In the screen configuration file:
|
|
|
* ```screen 12``` indicates a new tab with number ```12```
|
|
|
* ```title``` indicates the name of the tab (as shown in the list of tabs)
|
|
|
* ```stuff``` indicates the command that is run in the tab, the ```\015``` at the end indicates whether the command is run when starting the screen or if you have to start it manually
|
|
|
|
|
|
As an exercise, add a tab for the action of docking, undocking, and moving to a location (do not add ```\015``` at the end of the command line to make sure you don't start those actions every time you start the screen file).
|
|
|
|
|
|
Demonstration
|
|
|
-------------
|
|
|
|
|
|
* Show your ```screen``` file
|
|
|
* Use ```rviz``` and ```rqt```, to show how your robot responds to docking, undocking, and moving to a location.
|
|
|
|
|
|
Lab 1: Introduction to ROS2 and Turtlebot4
|
|
|
==========================================
|
|
|
|
|
|
This lab aims to introduce the basic concepts of ROS2 and its main tools. As part of the lab, you will also be introduced to the simulated environment: Turtlebot4.
|
|
|
|
|
|
Introduction
|
|
|
------------
|
|
|
|
|
|
_The Robot Operating System (ROS) is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behaviors across a wide variety of robotic platforms_. More information can be found on the [official website](https://www.ros.org/). It is commonly used by many robots in research and industry. ROS can transparently interact with real hardware or with a simulator.
|
|
|
|
|
|
Running
|
|
|
-------
|
|
|
|
|
|
**On Campus**
|
|
|
|
|
|
ROS is already installed on IDA computers, you can find it in the directories ```/opt/ros/galactic```, ```/usr``` and ```/courses/TDDE05/software```.
|
|
|
|
|
|
**ThinLinc**
|
|
|
|
|
|
Running on personal computers is currently not supported. However, it is possible to use ThinLinc to remotely access IDA's computers.
|
|
|
To use ThinLinc, follow the installation instructions at http://www.cendio.com/thinlinc/download and connect to the IDA server: ```thinlinc.edu.liu.se```.
|
|
|
|
|
|
ROS
|
|
|
---
|
|
|
|
|
|

|
|
|
|
|
|
ROS is a framework composed of communication middleware and a set of modules providing different functionalities for robots.
|
|
|
|
|
|
**Middleware:** With ROS, the various algorithms, interfaces to hardware, and simulators all run in different processes. ROS includes communication libraries for various programming languages: C++ ([rclcpp](https://index.ros.org/p/rclcpp/)) or Python ([rclpy](https://index.ros.org/p/rclpy/)).
|
|
|
There are libraries for more programming languages, but they are not as well supported, and it is recommended that you stick to C++ and Python for this course.
|
|
|
|
|
|
ROS programs mainly communicate through the use of topics.
|
|
|
ROS topics follow a multi-publishers/multi-subscribers pattern: ROS programs subscribe to individual topics and they will then receive the messages that are published by other programs on the topic.
|
|
|
Topics are associated with a specific type of a ROS message (examples of standard messages can be found at [std_msgs](https://index.ros.org/p/std_msgs/), it is possible to create custom messages to suit your needs).
|
|
|
|
|
|
In addition to topics, ROS programs can offer _service calls_, which is the ROS implementation of Remote Procedure Calls (RPC).
|
|
|
|
|
|
**Packaging system:** ROS also provides a standard method for defining software packages, using either the [CMake](cmake.org/) or [setupttools](https://setuptools.pypa.io/en/latest/setuptools.html) build systems. This package system allows you to easily install any ROS package.
|
|
|
|
|
|
Turtlebot4
|
|
|
----------
|
|
|
|
|
|

|
|
|
|
|
|
_TurtleBot 4_ is the next-generation of the world’s most popular open-source robotics platform for education and research, offering better computing power, better sensors, and a world-class user experience at an affordable price point.
|
|
|
|
|
|
For this course, the _Turtlebot 4_ is simulated, using a 2D simulator called _simple simulator_, which can run well in ThinLinc or the lab computers. The official project uses a 3D simulator, [https://gazebosim.org/](Gazebo), which works poorly on the IDA's computers.
|
|
|
|
|
|
Setup the environment
|
|
|
---------------------
|
|
|
|
|
|
### First, you will need to add the following to your ```.bashrc``` file:
|
|
|
|
|
|
```bash
|
|
|
alias tdde05-start=". /courses/TDDE05/software/bin/tdde05-start.sh"
|
|
|
```
|
|
|
|
|
|
To edit your ```.bashrc``` file, you can use the following command in a terminal:
|
|
|
|
|
|
```bash
|
|
|
kate ~/.bashrc
|
|
|
```
|
|
|
|
|
|
### You need to set your ROS Domain id
|
|
|
|
|
|
To avoid conflict with other ROS2 users, you need to set a unique ROS Domain id. You can do it using the following commands:
|
|
|
|
|
|
```bash
|
|
|
mkdir -p $HOME/TDDE05
|
|
|
kate $HOME/TDDE05/.domain_id
|
|
|
```
|
|
|
|
|
|
In the `.domain_id` file set your group number. For example, if you are in group 12, the file should contain ``12``.
|
|
|
|
|
|
### Every time you open a new terminal, before issuing a ROS command, you will need to run:
|
|
|
|
|
|
```bash
|
|
|
tdde05-start
|
|
|
```
|
|
|
|
|
|
Starting the simulator
|
|
|
-------------------
|
|
|
|
|
|
* To start the robot platform with the simple simulator:
|
|
|
|
|
|
```bash
|
|
|
ros2 launch air_bringup turtle.launch.py
|
|
|
```
|
|
|
|
|
|
If all goes well, the following image should appear:
|
|
|
|
|
|

|
|
|
|
|
|
The _red_ dot is the robot. The black squares are obstacles, and the dots with numbers are semantic objects used in another lab assignment.
|
|
|
|
|
|
Visualization
|
|
|
-------------
|
|
|
|
|
|
The robot is ready to accept commands, but the visualization by the simulator is very limited. However, ROS provides a good visualization tool called ```RViz```. To start it, run the following command in a terminal:
|
|
|
|
|
|
```bash
|
|
|
rviz2
|
|
|
```
|
|
|
|
|
|
It should start with a default configuration of the tool and look like the following:
|
|
|
|
|
|

|
|
|
|
|
|
We can add visualization using the ```add``` button. It should show a display like this:
|
|
|
|
|
|

|
|
|
|
|
|
The first thing to add is called ```TF```, which shows all the coordinate frames used by the robot. If too many frames are shown, deselect all of them (uncheck ```all enabled```). Then select ```odom``` and base link. It should show the origin of the world and the current position of the robot.
|
|
|
|
|
|
Then, add a 3D model of the robot, using the ```RobotModel``` visualization. In the `Displays` panels, look for `RobotModel` you need to write ```/robot_description``` for ```Description Topic```.
|
|
|
|
|
|
Then, add the map used by the robot to navigate: you can use the ```map``` visualization and then select the ```/map``` topic.
|
|
|
|
|
|
This should show a window that looks like this:
|
|
|
|
|
|

|
|
|
|
|
|
You can save your Rviz configuration from the file menu.
|
|
|
|
|
|
Sending commands to the robot
|
|
|
-------------------------
|
|
|
|
|
|
The robot is ready to accept commands. The first commands you can send to the robot are for docking and undocking, in a terminal:
|
|
|
|
|
|
```bash
|
|
|
ros2 action send_goal /dock irobot_create_msgs/action/Dock {}
|
|
|
ros2 action send_goal /undock irobot_create_msgs/action/Undock {}
|
|
|
```
|
|
|
|
|
|
The following action can be used to make the robot move forward with a given velocity:
|
|
|
|
|
|
```bash
|
|
|
ros2 action send_goal /drive_distance irobot_create_msgs/action/DriveDistance "{ distance: 3.5, max_translation_speed: 0.3 }"
|
|
|
```
|
|
|
|
|
|
The following action can be used to move the robot to a specific position:
|
|
|
|
|
|
```bash
|
|
|
ros2 action send_goal /navigate_to_position irobot_create_msgs/action/NavigateToPosition "{achieve_goal_heading: true,goal_pose:{pose:{position:{x: 3, y: 4,z: 0.0}, orientation:{x: 0.0,y: 0.0, z: 0.0, w: 1.0}}}}"
|
|
|
```
|
|
|
|
|
|
Managing topics from the command line
|
|
|
-------------------------------------
|
|
|
|
|
|
The main communication medium for ROS is through the use of _topics_. Topics have a name and a type and follow a publisher-subscriber pattern. You can use the following command to list all available topics:
|
|
|
|
|
|
|
|
|
```bash
|
|
|
ros2 topic list
|
|
|
```
|
|
|
|
|
|
If you want detailed information about a topic, i.e. to know the type and which nodes are subscribed/publishing use the following parameters with the topic name at the end. For example:
|
|
|
|
|
|
```bash
|
|
|
ros2 topic info -v /cmd_vel
|
|
|
```
|
|
|
|
|
|
You can listen to a topic from the command line to get the values:
|
|
|
|
|
|
```bash
|
|
|
ros2 topic echo /odom
|
|
|
```
|
|
|
|
|
|
To check what is happening, run one of the commands in the previous section, and you should see the position of the robot in the terminal.
|
|
|
|
|
|
And finally, you can publish on a topic:
|
|
|
|
|
|
```bash
|
|
|
ros2 topic pub --rate 100 /cmd_vel geometry_msgs/msg/Twist "{ linear: { x: 0.4, y: 0.0, z: 0.0}, angular: { x: 0.0, y: 0.0, z: 0.3 } }"
|
|
|
```
|
|
|
|
|
|
After that command, you should be able to see the robot move in a circle in RViz or the simulator window. You should also be able to see the position changes when listening to ```/odom``` topic.
|
|
|
|
|
|
RQT
|
|
|
---
|
|
|
|
|
|
An alternative approach to using the command line for listening or publishing on topics is to use a tool called RQT. You can start it from the command line simply with:
|
|
|
|
|
|
```bash
|
|
|
rqt
|
|
|
```
|
|
|
|
|
|
Then in the interface, from the plugin menu, add the following:
|
|
|
|
|
|
* ```topics > message publisher```
|
|
|
* ```topics > topic monitor```
|
|
|
* ```robot tools > robot steering``` you can then set the topic to ```/cmd_vel```.
|
|
|
|
|
|
The window should look like this:
|
|
|
|
|
|

|
|
|
|
|
|
If you check the ```/odom``` in the topic monitor, you can see it change. In the message publisher, you can add new topics and set the value to publish. Try to add ```/cmd_vel``` and publish the velocity. A more convenient alternative to controlling the velocity is to use the robot's steering panel (note that the robot does not like to move backward).
|
|
|
|
|
|
You can also use rqt to plot topic values. Add a plot with ```Visualization > Plot```. You can then add ```/diffdrive_controller/cmd_vel_unstamped/linear/x``` and ```/diffdrive_controller/cmd_vel_unstamped/angular/z```
|
|
|
|
|
|
You should see something like this:
|
|
|
|
|
|

|
|
|
|
|
|
screen
|
|
|
------
|
|
|
|
|
|
As you can see, we ended up starting a lot of commands from the terminal. It can be annoying to have so many windows and terminals open, a solution is to use [GNU Screen](https://www.gnu.org/software/screen/), which allows to start all the processes in a single terminal window.
|
|
|
|
|
|
The easiest way to use it is to create a screen configuration file (you can call it ```screen.tdde05```):
|
|
|
|
|
|
```
|
|
|
# Configuration
|
|
|
deflogin on
|
|
|
autodetach off
|
|
|
|
|
|
caption always
|
|
|
|
|
|
bindkey ^w screen
|
|
|
bindkey ^p prev
|
|
|
bindkey ^n next
|
|
|
bindkey ^x quit
|
|
|
bind q quit
|
|
|
bindkey ^l windowlist
|
|
|
bindkey ^e copy
|
|
|
|
|
|
# Pre-defined tabs
|
|
|
|
|
|
screen 0
|
|
|
title "simple sim"
|
|
|
stuff "tdde05-start; ros2 launch air_bringup turtle.launch.py\015"
|
|
|
|
|
|
screen 2
|
|
|
title "rviz"
|
|
|
stuff "tdde05-start; rviz2\015"
|
|
|
|
|
|
screen 3
|
|
|
title "rqt"
|
|
|
stuff "tdde05-start; rqt\015"
|
|
|
```
|
|
|
|
|
|
You can then start it from a terminal with ```screen -c screen.tdde05```.
|
|
|
|
|
|
The following shortkeys can be used:
|
|
|
|
|
|
* ```ctrl+w``` to create a new command tab
|
|
|
* ```ctrl+p``` to navigate to the previous tab
|
|
|
* ```ctrl+n``` to navigate to the next tab
|
|
|
* ```ctrl+x``` to quit
|
|
|
* ```ctrl+l``` to show the list of tabs
|
|
|
* ```ctrl+e``` to scroll in the log, using up/down arrow (page up/down works as well), press \verb|ESC| to stop scrolling
|
|
|
\end{itemize}
|
|
|
|
|
|
In the screen configuration file:
|
|
|
* ```screen 12``` indicates a new tab with number ```12```
|
|
|
* ```title``` indicates the name of the tab (as shown in the list of tabs)
|
|
|
* ```stuff``` indicates the command that is run in the tab, the ```\015``` at the end indicates whether the command is run when starting the screen or if you have to start it manually
|
|
|
|
|
|
As an exercise, add a tab for the action of docking, undocking, and moving to a location (do not add ```\015``` at the end of the command line to make sure you don't start those actions every time you start the screen file).
|
|
|
|
|
|
Demonstration
|
|
|
-------------
|
|
|
|
|
|
* Show your ```screen``` file
|
|
|
* Use ```rviz``` and ```rqt```, to show how your robot responds to docking, undocking, and moving to a location.
|
|
|
|