| ... | ... | @@ -107,7 +107,7 @@ 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.
|
|
|
|
|
| ... | ... | @@ -124,12 +124,44 @@ It should start with a default configuration of the tool and look like the follo |
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
We can add visualization using the ```add``` button. It should show a display like this:
|
|
|
|
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.
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary>1. Click me - Adding 3D model of the robot to visualization!</summary>
|
|
|
|
|
|
|
|
### Adding 3D model of the robot to visualization!
|
|
|
|
|
|
|
|
1. Click on ```Add``` button in `Displays` panel and select the ```RobotModel``` visualization.
|
|
|
|
2. Once its added, expand the `RobotModel` in `Displays` panel.
|
|
|
|
3. Look for ```Description Topic``` field and change its value to ```/robot_description```.
|
|
|
|
|
|
|
|
Here are the screenshots for steps 1-3:
|
|
|
|
|
|
|
|

|
|
|
|

|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary>2. Click me - Adding map of the environment to visualization!</summary>
|
|
|
|
|
|
|
|
### Adding 3D map of the environment to visualization!
|
|
|
|
|
|
|
|
1. Click on ```Add``` button in `Displays` panel and select the ```Map``` visualization.
|
|
|
|
2. Once its added, expand the `Map` in `Displays` panel.
|
|
|
|
3. Look for ```Topic``` field and change its value to ```/map```.
|
|
|
|
|
|
|
|
Here are the screenshots for steps 1-3:
|
|
|
|
|
|
|
|

|
|
|
|

|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
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.
|
| ... | ... | @@ -153,7 +185,7 @@ 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 }"
|
|
|
|
ros2 action send_goal /drive_distance irobot_create_msgs/action/DriveDistance "{ distance: 2.0, max_translation_speed: 0.3 }"
|
|
|
|
```
|
|
|
|
|
|
|
|
The following action can be used to move the robot to a specific position:
|
| ... | ... | @@ -203,11 +235,11 @@ An alternative approach to using the command line for listening or publishing on |
|
|
|
rqt
|
|
|
|
```
|
|
|
|
|
|
|
|
Then in the interface, from the plugin menu, add the following:
|
|
|
|
Then in the interface, from the Plugins menu, add the following:
|
|
|
|
|
|
|
|
* ```topics > message publisher```
|
|
|
|
* ```topics > topic monitor```
|
|
|
|
* ```robot tools > robot steering``` you can then set the topic to ```/cmd_vel```.
|
|
|
|
* ```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:
|
|
|
|
|
| ... | ... | |