This page holds information about using the ROS Robot Operating System.
Probably the best place to get information about ROS is the
ROS wiki
. Useful links in the ROS wiki include:
We use Indigo for the ROS Version. Newer ROS versions are not compatible with Ubuntu 14.04 LTS or the Turtlebot Software.
If you choose to install ROS on your machine, we recommend using the
ros-<version>-desktop-full
package.
We use catkin as the build infrastructure, which is a wrapper around
cmake
. The ROS tutorials explain how to setup and catkin. As a basic overview your directory structure should look something like:
~/workspace <- root folder, from where you run catkin_make to build --| build <- where catkin builds packages --| devel <- where catkin keep configuration files (especially setup.bash) --| src <- where you put all packages ----| crosbot <- Crosbot root ------| crosbot_msgs <- Crosbot packages ------| ... ----|comp3431_starter <- starter packages ....
Before you can call any ROS commands/software, such as
roscore
,
roslaunch
or even
catkin_make
, you need to source the correct ROS setup script. If you use the above build configuration, then you should call
source ~/workspace/devel/setup.bash
when you start each terminal. You can automate this by adding the source like to your
.bashrc
.
ROS needs two environment variables to be configured,
ROS_IP
and
ROS_MASTER_URI
.
ROS_IP
tells ROS the IP of your current machine. You can find this out with the
ifconfig
command.
ROS_MASTER_URI
tells the ROS process running in the current terminal where the ROS Master is located. Configure these with environment variables with:
ifconfig export ROS_IP=<ip-machine> export ROS_MASTER_URI=http://<ip-ros-master>:11311
For ROS to function it needs a common ROS Master (ie. a
roscore
). If no master is running, then a ROS Master is started. We recommend starting
one and only one
ROS master is a separate terminal on your computer, and then connect every other ROS process to that master. That is, open a terminal and run:
roscore
TL;DR
When you start a terminal you should run:
source ~/workspace/devel/setup.bash export ROS_IP=<ip-machine> export ROS_MASTER_URI=http://<ip-ros-master>:11311
Start a ROS master in a separate terminal on your computer, and use new terminals for all other ROS processes.
Resource created Wednesday 19 July 2017, 03:55:27 PM.