-
Notifications
You must be signed in to change notification settings - Fork 2
Initial setup
We talk to Q.bo via the ROS. It is recommended that you use the LTS release of Ubuntu (this is 12.04 or 'precise'). Using the latest version should also work but you'll probably have to upgrade at some point during the year.
The robot has ROS Hydro installed. This is the latest ROS version.
As noted above, the long-term support release is 12.04 which is recommended if you don't want to upgrade during the year. The latest version is 13.04. Either will work well. Unless you have good reason not to, install the x64 version.
You will need both your wired (ethernet, eth0
) and wireless (most-likely wlan0
) MAC addresses. These may be found via the link
stanza in the output of the ip addr
command.
Send these to the SigProC CO (Phill, pr374) and he'll get you sorted. After said sorting, you should be able to plug into the wired network and be DHCP-ed the correct IP. Important: make sure you know the hostname, the short name preceeding .eng.cam.ac.uk
, you'll need it if the output of the hostname
command doesn't match.
Use the ROS install guide.
The depthimage_to_laserscan package provides a fake laser device. In a terminal, type:
$ sudo apt-get install ros-hydro-depthimage-to-laserscan
See the detailed environment setup page for command-by-command instructions.
It is recommended that you set up a catkin workspace in your home directory. This guide assumes it is located under ~/cued-masters/
. After creating the workspace, you should have at least a devel/
and src/
directory under ~/cued-masters/
.
If is extremely important that the ROS_MASTER_URI
environment variable is set correctly. Failure to do so will result in nodes failing to launch on the Q.bo.
For convenience, I (rjw57) keep a file called setup.bash
under ~/cued-masters/
with the following contents:
source $HOME/cued-masters/devel/setup.bash
export ROS_HOSTNAME="`hostname`"
export ROS_MASTER_URI="http://${ROS_HOSTNAME}:11311"
Then, in a terminal, I can source ~/cued-masters/setup.bash
. NOTE: if you often switch between wireless and wired connections, you may want to have a custom version of setup.bash
for each connection.
Note: this script assumes the hostname
command has the right output. If for some reason it doesn't, set ROS_HOSTNAME
directly.
Unless you know what you're doing, issue the following commands to make sure git does the right thing when updating your local copies from GitHub:
$ git config --global branch.master.rebase true
$ git config --global branch.autosetuprebase always
See git workflows for more information.
If you haven't yet generated a SSH key, do so now. Unless you have any particular reason not to, press Enter at the prompts to accept the defaults.
$ ssh-keygen
Copy the SSH key to the Q.bo:
$ ssh -oHostKeyAlgorithms='ssh-rsa' qbo@sigproc-robot1
(The -oHostKeyAlgorithms
is a work-around for ROS being a little behind the latest SSH. See troubleshooting for more information.)
Ask rjw57 for the password. I (rjw57) also have the following in ~/.ssh/config so that I can just type ssh qbo
:
Host qbo
HostName binky
User qbo
Assuming you've got GitHub set up, clone the SigProC Q.bo stack:
$ cd ~/cued-master/src
$ git clone [email protected]:sigproc/qbo_sigproc.git
[ ... output ... ]
$ roscd qbo_sigproc_launch
We'll use the 'talker' and 'listener' nodes from the rospy tutorial to test the connection. The 'talker' node will be on the Q.bo and the listener on your own machine. The qbo_sigproc_launch
package has a test launch file for just this purpose:
$ roslaunch --screen qbo_sigproc_launch qbo_test_talker.launch qbo_address:=sigproc-robot1
The qbo_address
argument specifies the address of the Q.bo. The default is sigproc-robot1
and so it can be omitted. There is also a qbo_user
argument for the username on the Q.bo if it changes.
If you can see lines like the following, everything is working. If not, look at the Troubleshooting section. Press Ctrl-C to quit.
[INFO] [WallTime: 1380296566.321395] /listenerI heard hello world 1380296566.26
If the above is working, you're ready to try launching the Q.bo control stack proper:
$ rosrun rqt_console rqt_console # optional, but recommended
$ roslaunch qbo_sigproc_launch qbo.launch
If the rqt_console
program is run before the roslaunch
, then you'll get some nice log messages from any nodes that you start up.
If there are lots of messages of the form [qbo_arduqbo-1] process has died
, see the Troubleshooting section.
After a bit, the command rostopic list
(in another terminal) should print out a number of useful sensor and control topics as noted in the qbo_arduqbo documentation. Try rotating the Q.bo to the right:
$ rostopic pub -1 /cmd_vel geometry_msgs/Twist '[0,0,0]' '[0,0,-1]'
Use the 2D laser SLAM setup guide.