Skip to content

Instantly share code, notes, and snippets.

@ricardodeazambuja
Forked from ShreyasSkandan/ros_py35_setup.bash
Created February 22, 2019 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardodeazambuja/1d8a1accf334d4164c6f0d4f357f74bc to your computer and use it in GitHub Desktop.
Save ricardodeazambuja/1d8a1accf334d4164c6f0d4f357f74bc to your computer and use it in GitHub Desktop.
ROS Python3.5 Set Up
#!/usr/bin/env bash
# Create isolated ROS Workspace
cd ~
mkdir ros_py35
cd ros_py35
# Unset sourced workspace
# Go to ~/.bashrc and comment out lines from previous installation of ROS (Lunar)
# Get python3 helper libraries
sudo pip3 install rosdep
sudo pip3 install rosinstall_generator
#sudo pip3 install wstool
sudo pip3 install rosinstall
# Configure your catkin workspace
catkin config --init
catkin config -DCMAKE_BUILD_TYPE=Release
git clone https://github.com/tkruse/vcstools
cd vcstools
git checkout mock_server_tar_test
python setup.py develop
cd ..
git clone https://github.com/vcstools/wstool
cd wstool
python setup.py develop
wstool --help
# Pull bare-bone dependencies for ROS (Melodic) and use workspace tool to initialize
rosinstall_generator ros_comm --rosdistro melodic --deps --tar > melodic-ros_comm.rosinstall
wstool init -j8 src melodic-ros_comm.rosinstall
# If any installations failed, fix and continue using:
wstool update -j 4 -t src
# Set python version before catkin build
export ROS_PYTHON_VERSION=3
# Install some other dependencies
sudo apt install python3-empy
sudo apt install libgpgme11-dev
catkin build
# Note:
# You will probably see two build errors because of inappropriately set compile flags. They will try to compile without C++11 and fail.
# You can manually go to these CMakeLists.txt files and add "std=c++11" to the compile options and build again.
# Candidate trouble makers : src/ros_comm/rosbag & src/ros_comm/rosbag_storage
# Add other necessary ROS-Packages using rosinstall_generator
rosinstall_generator ros_comm sensor_msgs nav_msgs geometry_msgs --rosdistro melodic --deps --tar > melodic-ros_comm.rosinstall
wstool merge -t src melodic-ros_comm.rosinstall
wstool update -t src/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment