I am currently working on a Jetson TX2 for a drone project. I am trying to run ROS (melodic or noetic) and Tensorflow with python3. I want to use an IntelRealsense camera, feed the stream to a neural network on TensorFlow, and manage everything else like communication, perception, control, and planning on ROS.
So far I have tried different approaches but couldn’t find a proper one where everything works together.
- Standard ROS melodic installation did not work because it comes with python2.7.
- Used the ros-noetic docker image from dusty-nv since it comes with python3 but the installation steps for TensorFlow on Nvidia documentation did not work in docker.
- Built a docker container using the ROS-noetic base image from dusty-nv and inside the container built Tensorflow from source. This worked but then I tried to install additional ros packages like librealsense2 and it didn’t work. I figured out that I need to build everything additional from source and e.g. cv-bridge did not work. This solution may cause a lot of problems in the future steps of the development, the docker container gets very big in size and already caused memory issues.
- Made a release update to Ubuntu 20.04 but it comes with python3.8 and the whl files to install TensorFlow are for python 3.6. I built python 3.6 from source and managed to run TensorFlow but then faced a problem with catkin tools once switched to python3.6.
I appreciate your ideas and recommendations,
The system information of my Jetson TX2:
Hi @yumurta, this would be the way I would recommend - what did not work with installing TensorFlow? You can see my TensorFlow dockerfile here for the steps that I follow: https://github.com/dusty-nv/jetson-containers/blob/master/Dockerfile.tensorflow
Or you could also do it the other way around - change the base of the ROS Noetic container to my pre-built l4t-tensorflow container, and rebuild the Noetic container. This is what I do for the ros:pytorch containers, I build those on top of l4t-pytorch.
4. it should be possible to adjust the approach to get it working, in my opinion. However, there are two possible directions: to approach : A) OS upgrade to 20.04 systemwide or B) OS upgrade to 20.04 withing a container, without upgrading the OS systemwide
- Probably I did not use that particular docker image you are using but highly likely it should be possible to setup ros realsense packages. They are typically compatible with certain realsense sdk versions which need to be installed separately so specific version of ros package from realsense may require specific realsense sdk version installed. I would j also try using the default l4t base or tensorflow ngc container then add ros to there.
- If I were you I would rather build a docker container based on ngc l4t tensorflow with adding steps for installing melodic/noetic/foxy whatever is required
- you may like to check Building ROS Melodic with python3 support · GitHub
I did not try following exactly these steps but at some point we have had similar setup , as I recollect which was a matter of eventuallity
Finally if building the tensorflow outside of the container it shouldn’t be an issue to install it without use of whl, I guess?
also some outdated slightly examples can be found e.g.
Although perhaps if to install this one systemwide before upgrading to ubuntu
then to upgrade the OS to 20.04 it may still work after the upgrade
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.