Installing the ROS packages
Before the installation of the ROS packages, make sure our Debian package index is up-to-date:
$ sudo apt-get updateThere are many different libraries and tools in ROS—not all compile fully on ARM. So, it is not possible to make a full desktop installation. We should install ROS packages individually.
We could install ros-base (Bare Bones), which includes the ROS package, build, and communication libraries, but does not include GUI tools (press ENTER (Y) when prompted):
$ sudo apt-get install ros-<ros_version>-ros-baseHowever, we could try to install the desktop installation, which includes the ROS, rqt, RViz, and robot-generic libraries:
$ sudo apt-get install ros-<ros_version>-desktopAdding individual packages
We can install a specific ROS package:
$ sudo apt-get install ros-<ros_version>-PACKAGEFind available packages with the following command:
$ apt-cache search ros-<ros_version>Initializing rosdep
The rosdep command-line tool must be installed and initialized before we can use ROS. This allows us to easily install libraries and solve system dependencies for the source we want to compile, and is required to run some core components in ROS:
$ sudo apt-get install python-rosdep$ sudo rosdep init$ rosdep update
Environment setup
Well done! We have completed the ROS installation for the ARM platform. The ROS scripts and executables are mostly installed in /opt/ros/<ros_version>.
To get access to these scripts and executables, the ROS environment variables need to be added to the bash session. We have to source the following bash file:
$ source /opt/ros/<ros_version>/setup.bashIt's convenient if the ROS environment variables are automatically added to the bash session every time a new shell is launched:
$ echo "source /opt/ros/<ros_version>/setup.bash" >> ~/.bashrc
$ source ~/.bashrcIf we have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version we are currently using:
$ source /opt/ros/<ros_version>/setup.bashGetting rosinstall
rosinstall is a frequently used command-line tool in ROS that is distributed separately. It enables us to easily download several source trees for the ROS packages with a single command.
This tool is based on Python and can be installed using the following command:
$ sudo apt-get install python-rosinstallAs a basic example, we could run an ROS core on one terminal:
$ roscoreAnd from another terminal, we can publish a pose message:
$ rostopic pub /dummy geometry_msgs/PosePosition:x: 3.0y: 1.0z: 2.0Orientation:x: 0.0y: 0.0z: 0.0w: 1.0 -r 8
Moreover, we could set ROS_MASTER_URI on our desktop system (in the same network) to point to our ARM Platform (IP 192.168.X.X).
On your laptop, add the following:
$ export ROS_MASTER_URI=http://192.168.1.6:11311And, we will see pose published from the ARM platform to our laptop.
On your laptop, add the following:
$ rostopic echo -n2 /dummyPosition:x: 1.0y: 2.0z: 3.0Orientation:x: 0.0y: 0.0z: 0.0w: 1.0---