Skip to content

Commit

Permalink
updated instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasw committed Feb 20, 2022
1 parent d19a01c commit 100922c
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# ros_from_src

Build ros from source without using a PPA in a dockerfile (and later a github action).
Probably just copy what archlinux is doing.
Build ros from source without using a PPA (or even the debian ros packages):

git clone [email protected]:lucasw/ros_from_src.git
cd ros_from_src
docker build .
mkdir build
cd build
ROSCONSOLE=https://github.com/ros/rosconsole ../ros_from_src/git_clone.sh
# (take look at this script before running as sudo)
sudo ../ros_from_src/dependencies.sh
../ros_from_src/build.sh

To build with another ubuntu version:
The above should be similar to what is in the github action: .github/workflows/ubuntu_20_04.yaml

docker build --build-arg IMAGE=ubuntu:21.10 --build-arg PYTHON_MINOR_VERSION=9 . -t ros2110
export ROS_BUILD_DIR=$HOME/own/build/ros_from_src # or whatever
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$ROS_BUILD_DIR/ros/lib/cmake
# make this python3.8 if python --version shows that to be your version
export PYTHONPATH=$PYTHONPATH:$ROS_BUILD_DIR/ros/lib/python3.9/site-packages/
# source $ROS_BUILD_DIR/ros/setup.bash
source $ROS_BUILD_DIR/catkin_ws/devel/setup.bash

Build with default version, but give it a tag:
To build with docker and another ubuntu version:

docker build --build-arg IMAGE=ubuntu:20.04 . -t ros2004
docker build --build-arg IMAGE=ubuntu:21.10 --build-arg ROSCONSOLE=https://github.com/ros/rosconsole --build-arg PYTHON_MINOR_VERSION=9 . -t ros2110

Build with default Ubuntu 22.04 version:

docker build . -t ros2204

0 comments on commit 100922c

Please sign in to comment.