... | @@ -61,7 +61,9 @@ For this course, the _Turtlebot 4_ is simulated, using a 2D simulator called _si |
... | @@ -61,7 +61,9 @@ For this course, the _Turtlebot 4_ is simulated, using a 2D simulator called _si |
|
Setup the environment
|
|
Setup the environment
|
|
---------------------
|
|
---------------------
|
|
|
|
|
|
### First, you will need to add the following to your ```.bashrc``` file:
|
|
### Setting up ```.bashrc``` file:
|
|
|
|
|
|
|
|
First, you will need to add the following to your ```.bashrc``` file - this has to be done only once:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
if [ -f /courses/TDDE05/software/bin/tdde05-setup.sh ]; then
|
|
if [ -f /courses/TDDE05/software/bin/tdde05-setup.sh ]; then
|
... | @@ -98,12 +100,13 @@ start_ros |
... | @@ -98,12 +100,13 @@ start_ros |
|
Starting the simulator
|
|
Starting the simulator
|
|
-------------------
|
|
-------------------
|
|
|
|
|
|
* To start the robot platform with the simple simulator:
|
|
To start the robot platform with the simple simulator:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
start_ros
|
|
start_ros
|
|
ros2 launch air_bringup turtle.launch.py
|
|
ros2 launch air_bringup turtle.launch.py
|
|
```
|
|
```
|
|
|
|
**Important Note!** ```start_ros``` needs to be used to start ```bash``` terminal with ROS setup. **This has to be run always before any commands discussed below.**
|
|
|
|
|
|
If all goes well, the following image should appear:
|
|
If all goes well, the following image should appear:
|
|
|
|
|
... | @@ -130,34 +133,34 @@ It should start with a default configuration of the tool and look like the follo |
... | @@ -130,34 +133,34 @@ It should start with a default configuration of the tool and look like the follo |
|
|
|
|
|
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.)-->
|
|
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.)-->
|
|
|
|
|
|
We can now customize which information is visualized in Rviz. Following are instructions to add visualization of robot's position, its 3D model and map of the environment.
|
|
We can now customize which information is visualized in Rviz. The following are instructions for adding a visualization of the robot's position, its 3D model, and an environment map.
|
|
|
|
|
|
<details>
|
|
<details>
|
|
<summary>1. Click me - Adding TF to visualization - relevant coordinate frames!</summary>
|
|
<summary><span style="font-weight:bold;">1. Click me - Adding TF to visualization - relevant coordinate frames!</span></summary>
|
|
|
|
|
|
### Adding TF to visualization - relevant coordinate frames!
|
|
### Adding TF to visualization - relevant coordinate frames!
|
|
|
|
|
|
1. Click on ```Add``` button in `Displays` panel and select the ```TF``` visualization.
|
|
1. Click on the ```Add``` button in the `Displays` panel and select the ```TF``` visualization.
|
|
2. Once its added, expand the `TF` in `Displays` panel.
|
|
2. Once it is added, expand the `TF` in the `Displays` panel.
|
|
3. Look for ```Frames``` field. Most likely too many frames will be shown. Deselect all of them (uncheck ```All Enabled```). Then select ```odom``` and ```base link```.
|
|
3. Look for the ```Frames``` field. Most likely too many frames will be shown. Deselect all of them (uncheck ```All Enabled```). Then, select the ```odom``` and the ```base link```.
|
|
4. Now, rviz should show the origin of the world and the current position of the robot.
|
|
4. Now, rviz should show the origin of the world and the current position of the robot.
|
|
|
|
|
|
Here are the screenshots for steps 1-4:
|
|
Here are the screenshots for steps 1-4:
|
|
|
|
|
|

|
|

|
|

|
|

|
|

|
|

|
|
|
|
|
|
</details>
|
|
</details>
|
|
|
|
|
|
<details>
|
|
<details>
|
|
<summary>2. Click me - Adding 3D model of the robot to visualization!</summary>
|
|
<summary><span style="font-weight:bold;">2. Click me - Adding a 3D model of the robot to visualization!</span></summary>
|
|
|
|
|
|
### Adding 3D model of the robot to visualization!
|
|
### Adding a 3D model of the robot to visualization!
|
|
|
|
|
|
1. Click on ```Add``` button in `Displays` panel and select the ```RobotModel``` visualization.
|
|
1. Click on the ```Add``` button in the `Displays` panel and select the ```RobotModel``` visualization.
|
|
2. Once its added, expand the `RobotModel` in `Displays` panel.
|
|
2. Once it is added, expand the `RobotModel` in the `Displays` panel.
|
|
3. Look for ```Description Topic``` field and change its value to ```/robot_description```.
|
|
3. Look for the ```Description Topic``` field and change its value to ```/robot_description```.
|
|
|
|
|
|
Here are the screenshots for steps 1-3:
|
|
Here are the screenshots for steps 1-3:
|
|
|
|
|
... | @@ -167,13 +170,13 @@ Here are the screenshots for steps 1-3: |
... | @@ -167,13 +170,13 @@ Here are the screenshots for steps 1-3: |
|
</details>
|
|
</details>
|
|
|
|
|
|
<details>
|
|
<details>
|
|
<summary>3. Click me - Adding map of the environment to visualization!</summary>
|
|
<summary><span style="font-weight:bold;">3. Click me - Adding a map of the environment to visualization!</span></summary>
|
|
|
|
|
|
### Adding 3D map of the environment to visualization!
|
|
### Adding 3D a map of the environment to visualization!
|
|
|
|
|
|
1. Click on ```Add``` button in `Displays` panel and select the ```Map``` visualization.
|
|
1. Click on the ```Add``` button in the `Displays` panel and select the ```Map``` visualization.
|
|
2. Once its added, expand the `Map` in `Displays` panel.
|
|
2. Once it is added, expand the `Map` in `Displays` panel.
|
|
3. Look for ```Topic``` field and change its value to ```/map```.
|
|
3. Look for the ```Topic``` field and change its value to ```/map```.
|
|
|
|
|
|
Here are the screenshots for steps 1-3:
|
|
Here are the screenshots for steps 1-3:
|
|
|
|
|
... | @@ -186,9 +189,11 @@ Here are the screenshots for steps 1-3: |
... | @@ -186,9 +189,11 @@ Here are the screenshots for steps 1-3: |
|
|
|
|
|
Then, add the map used by the robot to navigate: you can use the ```map``` visualization and then select the ```/map``` topic.
|
|
Then, add the map used by the robot to navigate: you can use the ```map``` visualization and then select the ```/map``` topic.
|
|
-->
|
|
-->
|
|
If you were successful your Rviz window should look as on the screenshot blow.
|
|
</br>
|
|
|
|
If you were successful, your Rviz window should look as on the screenshot blow.
|
|
**Note**, you can save your Rviz configuration from the file menu.
|
|
**Note**, you can save your Rviz configuration from the file menu.
|
|
|
|
|
|
|
|
</br>
|
|
|
|
|
|

|
|

|
|
|
|
|
... | | ... | |