Skip to content

Commit

Permalink
Added the ROS configuration in Jetson
Browse files Browse the repository at this point in the history
  • Loading branch information
rogergranada committed Oct 20, 2017
1 parent 029e751 commit d917c5c
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 19 deletions.
66 changes: 47 additions & 19 deletions docs/source/jetson/ros.rst
Original file line number Diff line number Diff line change
@@ -1,31 +1,59 @@
===========================================
Robot Operating System (ROS) on Jetson TK1
===========================================

=============================================
Installing ROS
=============================================
Robot Operating System (ROS) is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management. It also provides tools and libraries for obtaining, building, writing, and running code across multiple computers. The ROS runtime "graph" is a peer-to-peer network of processes (potentially distributed across machines) that are loosely coupled using the ROS communication infrastructure. ROS implements several different styles of communication, including synchronous RPC-style communication over services, asynchronous streaming of data over topics, and storage of data on a Parameter Server [1]_.

The primary goal of ROS is to support code reuse in robotics research and development so you can find a built-in package system. It is interesting to note that although ROS contains Operation System in the name, keep in mind that ROS is not an OS, a library, or an RTOS, but a framework using the concept of an OS. A good introduction is given in the freely available book named `A Gentle Introduction to ROS <https://www.cse.sc.edu/~jokane/agitr/agitr-letter.pdf>`_ by Jason O'Kane. The `ROS Wiki <http://wiki.ros.org/ROS/Tutorials>`_ also contains lots of tutorials to introduce you to its main concepts.

About ROS

Installing ROS in Jetson TK1
-----------------------------

- links to papers and manuals or other tutorials
-
JetsonPack for Jetson TK1 is based on Ubuntu 14.04 and thus, the ROS version to install is named *Indigo*. In order to install the ROS package, you can run the ``installROS.sh`` file as:

How to install the driver and its depedencies
-----------------------------
.. code-block:: bash
- where/how to download
- how to configure it
- how to install its depedencies
- how to install software depedencies and additional required nodes
- provide a script to install it all at once
$ wget --no-check-certificate --content-disposition https://raw.githubusercontent.com/lsa-pucrs/platypus_doc/master/docs/source/jetson/scripts/installROS.sh
$ chmod +x installROS.sh
$ ./installROS.sh
Known limitations
-----------------------------
This script installs ROS Indigo Desktop and the Point Cloud Library.

describe here any known limitation of the software so that the next student is aware of it.

How to test it
-----------------------------
Creating Catkin workspace to run ROS
-------------------------------------

Catkin packages can be built as a standalone project, in the same way that normal cmake projects can be built, but catkin also provides the concept of workspaces, where you can build multiple, interdependent packages together all at once. A catkin workspace is a folder where you modify, build, and install catkin packages [2]_. In order to create a Catkin workspace, you should download and run the file `createCatkin.sh` as:

.. code-block:: bash
$ wget --no-check-certificate --content-disposition https://raw.githubusercontent.com/lsa-pucrs/platypus_doc/master/docs/source/jetson/scripts/createCatkin.sh
$ chmod +x createCatkin.sh
$ ./createCatkin.sh
This script creates a structure in the home folder with the root workspace set in ``/home/ubuntu/catkin_ws``.


Testing ROS installation
-------------------------

To check if the ROS is installed correctly, run:

.. code-block:: bash
$ roscore
And see it starts running correctly. In case of problem, you can check the log files by running:

.. code-block:: bash
$ roscd log
References
-----------

- basic testing to see if the is procedure working on the RPi
.. [1] `ROS Introduction <http://wiki.ros.org/ROS/Introduction>`_
.. [2] `Catkin Workspaces <http://wiki.ros.org/catkin/workspaces#Catkin_Workspaces>`_
15 changes: 15 additions & 0 deletions docs/source/jetson/scripts/createCatkin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# Create Catkin Environment for ROS

# create a folder for Catkin Workspace
mkdir -p catkin_ws/src
cd catkin_ws/src
catkin_init_workspace

# compile the environment
cd /home/ubuntu/catkin_ws
catkin_make

echo "" >> ~/.bashrc
echo "# Load Catkin Workspace" >> ~/.bashrc
echo "source /home/ubuntu/catkin_ws/devel/setup.bash" >> ~/.bashrc
18 changes: 18 additions & 0 deletions docs/source/jetson/scripts/installROS.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
# Install Robot Operating System (ROS) in Jetson

# Add ros repository to sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -

# Install ROS and Point Cloud Library
sudo apt-get update
sudo apt-get install ros-indigo-desktop
sudo apt-get install ros-indigo-pcl-conversions

echo "" >> ~/.bashrc
echo "# Load ROS environment" >> ~/.bashrc
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc

source ~/.bashrc

0 comments on commit d917c5c

Please sign in to comment.