Writing Your First Interaction
In this lesson we will write user side of rocon application. We will learn how to add follower application in application list.
Prerequisites
This lesson is a continuation of the previous lesson: “Multiple TurtleBots in Concert”. If you have not done this lesson, do it firstly.
Creating interaction
1. Create interactions folder in my_rapps
.
2. Create my.interactions
file with following content:
Modifying concert_service_gazebo Package
1. Clone concert_services
.
2. Change directory.
3. Change git branch.
3. Edit robot.launch
file.
Add robot_interactions
and robot_interactions_list
arguments
below robot_concert_whitelist
and above include
tag.
Add interactions
and interactions_list
arguments below
concert_whitelist
and inside include
tag.
4. Edit gazebo_robot_manager.py
file.
Add two strings in _prepare_rocon_launch_text
function
above this string
We edit this file for using robot_interactions
and robot_interactions_list
parameters.
Modifying gazebo_concert Package
1. Edit gazebo.parameters
file.
Add interactions
and interactions_list
for each robot.
2. Build package.
Running Follower Application
1. Change the path.
2. Launch gazebo_concert.
You will see these strings in each robot terminal.
3. Start rocon_remocon.
4. Select Gazebo Concert
->User
->Gazebo Viewer
.
You will see the familiar Gazebo world.
5. Select Concert Teleop
in Interactions Chooser
.
6. Select gamza1
in the resource list and capture it.
7. In a new terminal start rocon_remocon.
8. Press Add
. Edit MASTER_URI
.
9. Press Add
. You will see ros master gamza2
.
10. Select gamza2
.
11. Select My Interactions
.
12. Select Follower
.
13. Drive gamza1
using joystick to initiate following behavior.
14. Interrupt the processes. Close the windows.
You can watch these steps in the video: