ROS Melodic Python 3 Source

asked 2019-04-30 14:17:30 -0600

rukie gravatar image

As I'm a glutton for punishment I keep trying to find a way to get Python 3 to work with ROS, even starting from source.

Side note: I reviewed ROS2, but the TF2 package isn't incorporated into ROS2 Python3 yet.

Anyways, I tried with a fresh install of Ubuntu 18.04 with the commands below, but I don't seem to download the resources consistently. Only about 4 packages downloaded with the VCSTools fix described below.

I guess what I'm asking, does anyone have a well described path on how to build ROS1 (anything) with Python3 support? Really all I desire is ROS commands, debugging tools, and TF2.

I've tried following these bash.scripts as well, which also seem to fail similarly.

sudo sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

sudo apt-key adv --keyserver hkp:// --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

sudo apt update
# can probably leave out wstool?
sudo apt install python3-rosdep python3-rosinstall-generator python3-wstool python3-rosinstall build-essential

sudo rosdep init

sudo rosdep update

cd ~
git clone
cd vcstools
git checkout mock_server_tar_test
python3 develop

cd ~
git clone
cd wstool
python develop

mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws

rosinstall_generator desktop_full --rosdistro melodic --deps --tar > melodic-desktop-full.rosinstall
wstool init -j8 src melodic-desktop-full.rosinstall
edit retag flag offensive close merge delete


Did you get it working in the end?

gustavo.velascoh gravatar image gustavo.velascoh  ( 2020-04-01 09:00:06 -0600 )edit

I did not :(

rukie gravatar image rukie  ( 2020-04-01 13:56:15 -0600 )edit

At around the time @rukie asked this question, Github changed something which made vcstools unable to download the required release tarballs. This has been fixed for quite some time now.

Building Melodic with Python 3 support is more than possible. Not all packages, but that is something you'll always run into with something as federated as ROS.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-01 13:58:56 -0600 )edit