-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.md
137 lines (108 loc) · 3.97 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# husarion-rosbot-2-gazebo-simulation
Husarion ROSbot 2.0 simulation in gazebo and rviz with ORB_SLAM
### Brief Explanation
* **rosbot_description** specifies the entire robot structure as links and joints and can launch the model in rviz.
* **rosbot_gazebo** launches the model in the gazebo environment and contains different simulation worlds
* **learning_joy** teleop_joy stick node for teleoperating ROSbot2 with xbox 360 gamepad
* **rosbot_navigation** launches teleop_keyboard node
* **ORB_SLAM** contains ORB_SLAM package for ROSbot2
### Install gazebo-ros control
```
sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control
```
### Simulating ROSbot 2 in Gazebo along with Rviz and ORB_SLAM
Download gazebo_model from the following link:
```
https://bitbucket.org/osrf/gazebo_models
```
In a new terminal clone the repositroy
```
hg clone https://[email protected]/osrf/gazebo_models
```
After cloning the gazeb0_model, add the following line to your `~./bashrc` script.
```
sudo gedit ~/.bashrc
export GAZEBO_MODEL_PATH=[...]/models:$GAZEBO_MODEL_PATH
```
For instace, if your clone your gazebo model in your home folder then it should be like this.
```
export GAZEBO_MODEL_PATH=/home/arslanali/gazebo_models:$GAZEBO_MODEL_PATH
```
### complining the package
In new terminal
```
mkdir -p ~/catkin_ws/src
cd catkin_ws/src
git clone https://github.com/Marslanali/husarion-rosbot-2-gazebo-simulation.git
catkin_make
```
Now Load the Gazebo and Rviz simulator in separate terminals using the following commands:
```
roslaunch rosbot_gazebo rosbot_gazebo_rviz_demo3.launch
```
#### Running keyboard teleop:
The ~/catkin_ws/src/rosbot_navigation folder contains the *rosbot_teleop.launch* file, which contain a teleop node.
Start the teleop node:
```
roslaunch rosbot_navigation rosbot_teleop.launch
```
#### Running Xbox 360 gamepad teleop:
The ~/catkin_ws/src/learning_joy folder contains the *turtle_joy.launch* file, which contain a turtle_joy node.
```
roslaunch learning_joy turtle_joy.launch
```
#### Getting RGB image to display
```
rosrun image_view image_view image:=/camera/rgb/image_raw
```
#### Simulation screenshots
<p align="left">
<img src="screen_shots/house_world.jpg" width ="450" height="450"/>
<img src="screen_shots/rosbot2_rviz.png" width ="450" height="450"/>
<br/>
Fig. 1. Gazebo and Rviz simualtion of ROSbot2
</p>
<p align="left">
<img src="screen_shots/rosbot_orb.png" width ="600" height="400"/>
<br/>
Fig. 2. ORB_SLAM view
</p>
### Demo Videos
[https://www.youtube.com/watch?v=Xm3ef-apk04&t=2s](https://www.youtube.com/watch?v=Xm3ef-apk04&t=2s)
[https://www.youtube.com/watch?v=G2Vk4WQwM2U&t=66s](https://www.youtube.com/watch?v=G2Vk4WQwM2U&t=66s)
#### Running Xbox 360 gamepad teleop:
The ~/catkin_ws/src/learning_joy folder contains the *turtle_joy.launch* file, which contain a turtle_joy node.
```
roslaunch learning_joy turtle_jhttps://www.youtube.com/watch?v=G2Vk4WQwM2U&t=66soy.launch
```
### Extra
### Running webcame camera node on second laptop and ORB_SLAM subscribe use it in first laptop
#### For machine 1 (Subscriber and running roscore, ORB_SLAM and, Rviz)
```
sudo apt-get install ros-kinetic-camera-umd
```
Now in a new terminal, launch uvc_camera_node with following command
```
rosrun uvc_camera uvc_camera_node
```
To view in image_view, run the following commmand
```
rosrun image_view image_view image:=/image_raw _image_transport:=compressed
```
#### For machine 2 publisher running camera node
```
sudo apt-get install ros-kinetic-camera-umd
```
Now in a new terminal, launch uvc_camera_node with following command
```
rosrun uvc_camera uvc_camera_node
```
To view in image_view, run the following commmand
```
rosrun image_view image_view image:/=image_raw _image_transport:=compressed
```
Add the following to your `~/.bashrc` script. Replace your ip idress of second machine.
```
export ROS_MASTER_URI=http://192.168.43.127:11311/
```
If you face any difficulty, feel free to drop an email at [email protected]