Installing ROS on Nano

I have found this tutorial but unsure how to load ROS on the Nano.

Install the ros-base package on your Jetson following these directions:

TX1/TX2 (ROS Kinetic) - JetsonHacks Post
Xavier (ROS Melodic) - ROS Install Instructions

which leads us to here:
http://wiki.ros.org/melodic/Installation/Ubuntu

then they offer these differing installs, which one will fit ?

Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators and 2D/3D perception

sudo apt install ros-melodic-desktop-full

Desktop Install: ROS, rqt, rviz, and robot-generic libraries

sudo apt install ros-melodic-desktop

ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.

sudo apt install ros-melodic-ros-base

Hi Traversity,

Please refer to ROS section from below GitHub:
https://github.com/dusty-nv/ros_deep_learning

Thanks

Hi, yes thanks, I have already looked there and followed it in the above notes.

My question now is, " will it fit"
4GB ram may be just ok, but 16GB storage seems very light to me.

did you get ROS running on a Jetson board ?
how large is the flash footprint ?
maybe I should ask in another question

I think it depends if you are also installing other libraries/frameworks like TensorFlow or PyTorch alongside ROS which can take up significant additional disk space.

But if you are just installing ros-base in 16GB SD card, it may be worth a try. Worst case you may need to use a larger MicroSD card.

I use the Jetson Redtail sources for easy installation of ROS on TX1. Should work just as well on the nano:

Installing project dependencies
Our project has several dependencies like ROS, GStreamer and others that need to be installed before running the code. The jetson_ros_install.sh script located in ros/scripts will install all required dependencies. The script requires some input (very little) so make sure you are monitoring the console while the script is running. Once the script completes running, log out and log in back again to make sure all ROS environment variables are initialized.

I have installed this on TX1 internal 16GB emmc without space issues.

A difference to be cognisant of when installing, is that TX1 uses Ubuntu 16.04 and ROS Kinetic, while Nano uses Ubuntu 18.04 and ROS Melodic.

1 Like

can’t be left struggling in development, due to a short / slow platform and little time.

Now looking at the Tx2 - 8GB/32B
with extras; SATA, CanBus and ability to decode many cameras whilst busy.

once I have a better handle on the system, maybe Nano would be adequate.
looks like GStreamer is primarily necessary.

Not sure the differences between; Melodic or Kinetic,.

We are rolling over rough ground.
please advise :)

I would consult the ROS website for the definitive differences, but in my experience I haven’t encountered any incompatabilities porting nodes from Kinetic to Melodic. It was a relatively painless and straightforward upgrade in my experience.

Note that the latest release of JetPack 4.2 also runs Ubuntu 18.04 on TX2, so TX2 is on ROS Melodic now also.

Hello,

Is ROS Kinetic supported in Jetson nano?"

Using sudo apt-cache search ros-kinetic gives 0 results, but searching for ros-melodic gives a lot of results.

I ask because I tried to install ROS following the Jetson Hacks post for ROS Kinetic TX2, but after the installation process finished, roscore resulted in a ‘command not found’ and the folder /opt/ros/kinetic/setup.bash does not exist.

THanks,

ROS Kinetic is for Ubuntu 16.04, and Jetson Nano + JetPack 4.2 supports Ubuntu 18.04. ROS Melodic is for Ubuntu 18.04, so ROS Melodic is used on Nano.

This article was written for TX2 with a previous version of JetPack which used Ubuntu 16.04 on TX2, hence it was using ROS Kinetic. Since the release of JetPack 4.2, Jetson TX2 is now also Ubuntu 18.04, so TX2 would now use ROS Melodic also.

1 Like

Hello,

Thanks for your fast reply! I wanted to apologize because an internet search told me what you just kindly did: ROS Kinetic is for Ubuntu 16.04 and Melodic for 18.04.

Sorry about that!

Hi,

ROS Melodic is for python 2. To use the version of tensorflow for NANO needs Python 3. Therefore I would need to install ROS2 which is for python 3. Do you have instructions to install ROS2 or can say which version of ROS2 to install on NANO?

I’ve not tried ROS2 on Nano yet, but it appears from this ROS2 aarch64 support page that Python support may be disabled:

https://github.com/ros2-for-arm/ros2/wiki/ROS2-on-arm-architecture

It would seem that some people have been able to get ROS Melodic working with Python3:

https://medium.com/@beta_b0t/how-to-setup-ros-with-python-3-44a69ca36674

Alternatively you could try building TensorFlow for Python2, or using TensorRT Python API instead.

Do you have a page for Tensorflow for python 2.7 like this one for python3 on NANO?

https://devtalk.nvidia.com/default/topic/1048776/official-tensorflow-for-jetson-nano-

I tried installing using pip2, but it says that there is no version available.

We officially provide Python3 pip wheel installer, as most users are on Python3 at this point.

However you could try building for Python2 using a helper like this:

https://github.com/JasonAtNvidia/JetsonTFBuild

If you have trouble, try logging a bug on the GitHub so the devs are alerted to it. Thanks.

Hmm, it would be helpful if we could get some assistance to build ROS2 package , the latest release , for Jetson NANO arm architecture, to also include python support. It looks like all the dependencies just needs to be built. If one needs ROS using python 3, then ROS2 is the way to go apparently.

That way we can actually use ROS(2) on Jetson NANO & the Jetson NANO GPU, with TensorFlow & Keras.

BTW, the instructions here that you mention above …
https://medium.com/@beta_b0t/how-to-setup-ros-with-python-3-44a69ca36674

are for building ROS on X86_64 for PYTHON 3.

Kinetic is for 16.04 version of Ubuntu. 18.04 requires melodic. Runs just fine on the nano. Go to wiki.ros.org and follow the instructions. ros-melodic-desktop is the one to use. Desktop-Full has programs that require more resources than the nano has. Since you can install other nodes as needed just the ros-melodic-ros-base is probably the best way to go especially if you aren’t using a SSD via usb. Dusty-nv’s github has some ros nodes for the nano. I was running those the other evening.

There are efforts to move ROS (1) to Python 3 considering Python 2.7 will be end of life and end of maintenance in Jan 2020. There is an effort to allow ROS (1) with Python 3 to be installed side by side with Python 3
https://github.com/ros-infrastructure/rosdep/issues/618

This message on the ROS site has some suggestions on how to install ROS (1) with Python 3. The suggestion is to use ROS-Com for a minimal install and set ROS_PYTHON_VERSION to 3 to force building to Python 3; the default is Python 2.
https://answers.ros.org/question/295012/how-can-i-install-ros-melodic-with-python3/

Here is an older discussion on the ROS GitHub regarding support Python 3 with ROS (1).
https://github.com/ros-infrastructure/rep/pull/149

This person created a nice little script to help resolve the Python 3 dependencies with ROS Melodic.
https://gist.github.com/ShreyasSkandan/fd8682253d71c960b2b56376db6bd74a

Really, at this point no new work should be done with Python 2.x which I suspect will be a pain point for many.

For ROS2, I followed the instructions from this ROS2 site and it worked without issue. I was able to run the example without issue. There is a ROS1 bridge package that can be installed to bridge the two ROS installs. This installs ROS2 Crystal.
https://index.ros.org/doc/ros2/Installation/Crystal/Linux-Install-Debians/

I tried the Linux example but had way too many errors, but the Debian one does work.
Has errors:
https://index.ros.org/doc/ros2/Installation/Crystal/Linux-Development-Setup/