-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |