Using fastai v1 in ROS

(mohamed amin houidi) #1

I want to use the Robot Operating System (ROS) with fastai and pytorch inorder to apply what i’ve learnt in this course to the field of robotics.
however when i install conda , i cant use ros anymore. and since the default version of python for ros is python 2.7, i was wondering how i can use fastai and pytorch libraries which depend on python 3 in ros.

ps: a ros node is just a word for a program.

pps:found solution for using ros inside conda env,

ppps: if you’re not using conda,it becomes easy. ros requires a python 2 env so most of its packages work,but many of them(and the most important of them) work with both python2 and 3.
THE BEST WAY would be to have your default python version 2.7 so most packages work,and write your deep learning programs (nodes) in python 3.much easier than using conda.

(Sanyam Bhutani) #2

Did you check this?
Also, Please make sure to include details around what is ROS and what is a ROS node, why would you like to use fastai with ROS, so that others who aren’t familiar with ROS may also be able to help you.


(mohamed amin houidi) #3

thanks for replying.i checked it out and it wasnt the solution.instead,i found a partial solution in this video:

although a partial one,because now i’m unable to use rospy outside of the conda env,but thats okay for now.
and if i didn’t install anaconda,it would’ve been possible to use pytorch and fastai in ros nodes(a ros node is a word for a program,script) without any modification,meaning you can write ros nodes in python 3.