-
Notifications
You must be signed in to change notification settings - Fork 1
/
Groovy_Instructions.txt
221 lines (143 loc) · 7.26 KB
/
Groovy_Instructions.txt
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
----------------------------------------------------------------------------------------------------------
Getting Started
----------------------------------------------------------------------------------------------------------
R.O.S. or Robot Operating System is used to communicate between a computer and a robot. ROS currently uses 3 languages: C++,
Python and Java. I am using ROS Java although it is still under active development and so features are volatile.
-----------------------------------------------------
ROS options
-----------------------------------------------------
1a) Use a Virtual machine disk image with Ubuntu and ROS already installed. Instructions here:
http://nootrix.com/2012/09/virtualizing-ros/
1b) Install ROS natively on Ubuntu or Mac OS X. (As of 2012 I was unable to get a working install of ROS on Mac OS X)
1c) Install Ubuntu on a separate partition on your machine and dual boot. Then install ROS and ROS Java. Instructions here:
http://wiki.ros.org/ROS/Installation
I have used the third option as this is the best option available to me. I am using Ubuntu 13.04 and ROS Groovy as
this is the best combination for my laptop
-----------------------------------------------------
Complete the ROS Tutorials
-----------------------------------------------------
It is important to complete the tutorials on the ROS wiki. These not only provide a good introduction to the various
tools that you will need whilst using ROS. It also helps you setup your ROS Environment which is needed for the next step.
If you do not wish to complete all of the ROS Tutorials (You may have done them already) then these commands are still
neccessary:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
-----------------------------------------------------
Installing ROS Java
-----------------------------------------------------
I was unable to find a complete set of instructions for installing ROS Java so I have created this guide to help
people do it.
1) Install the Java Runtime Environment and Java Development Kit
To install ROS Java you obviously need to install a version of Java. If you already have Java installed you may
skip this step.
(I am using openjdk however there are alternate releases of Java for linux)
sudo apt-get install openjdk-7-jre
sudo apt-get install openjdk-7-jdk
2) Install Netbeans
I use Netbeans as my IDE so will install that now.
sudo apt-get install netbeans
3) Move into your workspace
Mine is:
roscd
cd ../src
4) Clone the Rosjava code from the github repository
git clone https://github.com/rosjava/rosjava_core -b groovy
5) cd into rosjava_core
cd rosjava_core
6) Use Gradlew to build and install rosjava_core
./gradlew install
That should be rosjava installed although theres one more step that still need to be done.
7) Create a symbolic link to be able to use gradle
mkdir ~/bin
ln -s PATH_TO_ROSJAVA_CORE/gradlew ~/bin/gradle
echo 'export PATH=$PATH:~/bin' >> ~/.bashrc
source ~/.bashrc
This creates a link between the bin folder in your home directory and the gradlew install in rosjava_core. Then
the third line adds this to your execution path which is what's checked when you type commands into the command line.
-----------------------------------------------------
Connecting to a robot
-----------------------------------------------------
If you want to connect to the robot you will need to install the drivers below.
You will also need to add yourself to the dialout group to have permission to read and write to USB devices
sudo usermod -a -G dialout <Username>
This command requires you to logout or reboot to take effect
-----------------------------------------------------
Installing the p2os drivers (Connection to the robot)
-----------------------------------------------------
1) Install p2os_driver which controls the connection to the robot
sudo apt-get install ros-groovy-p2os-driver
-----------------------------------------------------
Installing the laser drivers (Connecting to the laser)
-----------------------------------------------------
sudo apt-get install ros-groovy-laser-drivers
-----------------------------------------------------
Using the kinect
-----------------------------------------------------
The Kinect publishes the skeleton points to the tf topic relevant to the frame the kinect is connected to.
1) Install the ros Openni package
sudo apt-get install ros-groovy-openni-*
2) Go to the NITE website and download the NITE package and then install it
http://www.primesense.com/solutions/nite-middleware/
unzip the NITE package
cd into it
./uninstall.sh
./install.sh
3) Launch the kinect.launch file from this git
roslaunch kinect.launch
4) If there are no errors in the kinect terminal window then you can see the output in rviz (I regularly get
segmentation faults running rviz but just try running it again)
rosrun rviz rviz
5) Change the fixed frame to /base_camera_link
6) Add a tf view to rviz
Click the button at the bottom left "Add"
(If the add button is not visible try maximising the window)
Find the tf view and click ok
(The NITE package seems to be very picky which openni versions it works with. I have tried two versions and one
requires the PSI pose and one does not).
----------------------------------------------------------------------------------------------------------
Troubleshooting
----------------------------------------------------------------------------------------------------------
Error running roscore or ros packages:
Unable to contact my own server at [http://<hostname>:<ip address>/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot ping itself. Please check
for errors by running:
ping laptop-2014
For more tips, please see
http://www.ros.org/wiki/ROS/NetworkSetup
Solution:
If the above website (i.e. removing /etc/hostname and rebooting) does not solve the problem you can try these
two commands.
export ROS_MASTER_URI=http://localhost:11311
export ROS_HOSTNAME=localhost
(These commands are only reported to work on a one robot system and a one computer system.)
-----------------------------------------------------
HOKUYO LASER
-----------------------------------------------------
Error connecting to Hokuyo node:
If you have trouble connecting to the hokuyo node with the error message below:
Error: Failed to open port. Permission denied.
Solution:
Try the step above in connecting to the robot.
Error connecting to Hokuyo laser:
If there is an error connecting to the Hokuyo laser (Especially when using move_base) the process may not die
but you may not receive any information from the laser.
You can attempt this fix (I have had limited success):
sudo /etc/init.d/udev stop
sudo /etc/init.d/udev start
or logout/restart which seems to fix it.
-----------------------------------------------------
P2os error
-----------------------------------------------------
Error starting p2os_driver:
[ERROR] [1387579445.188477871]: P2OS::Setup():open():
[ERROR] [1387579445.188540728]: p2os setup failed...
Solution:
1) If you are simulating the robot you will not need the p2os_driver.
2) Is the robot on?
3) Try the step above in connecting to the robot.