Skip to content

Commit

Permalink
move all git clones into vcs yaml file, commingle catkin packages and…
Browse files Browse the repository at this point in the history
… cmake/python packages for now
  • Loading branch information
lucasw committed Jul 15, 2024
1 parent d5fadc4 commit 67ab583
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu_24_04.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
ubuntu2404dockeron2204:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# env:
steps:
- name: git clone [email protected]:lucasw/ros_from_src
Expand All @@ -18,7 +18,7 @@ jobs:
- name: docker build from source 24.04
run: |
cd ros_from_src
docker build --build-arg IMAGE=ubuntu:24.04 --build-arg PYTHON_MINOR_VERSION=10 . -t ros2404
docker build --build-arg IMAGE=ubuntu:24.04 . -t ros2404
# TODO(lucasw) ubuntu_2404/Dockerfile doesn't work, was depending on the now-removed
# apt debian science ros packages
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG IMAGE=ubuntu:22.04
ARG IMAGE=ubuntu:24.04
FROM ${IMAGE}
ARG IMAGE
RUN echo ${IMAGE}
Expand All @@ -14,9 +14,9 @@ RUN apt-get install -yqq git

# TODO(lucasw) this doesn't work in 20.04 because of log
# --build-args ROSCONSOLE=https://github.com/ros-o/rosconsole
ARG ROSCONSOLE=https://github.com/ros-o/rosconsole
# ARG ROSCONSOLE=https://github.com/ros-o/rosconsole
# ENV ROSCONSOLE=$ROSCONSOLE
RUN echo $ROSCONSOLE
# RUN echo $ROSCONSOLE

# packages that need to be cmake installed, and are ros packages in a catkin workspace
RUN mkdir $SRC/ros_from_src -p
Expand All @@ -26,9 +26,11 @@ COPY dependencies.sh $SRC/ros_from_src
RUN $SRC/ros_from_src/dependencies.sh

# WORKDIR $SRC/ros_from_src
COPY underlay_repos.yaml $SRC/ros_from_src
RUN mkdir -p underlay_ws/src
COPY underlay_repos.yaml underlay_ws/src
COPY git_clone.sh $SRC/ros_from_src
RUN ROS_CONSOLE=$ROSCONSOLE $SRC/ros_from_src/git_clone.sh
# RUN ROS_CONSOLE=$ROSCONSOLE $SRC/ros_from_src/git_clone.sh
RUN $SRC/ros_from_src/git_clone.sh

COPY build.sh $SRC/ros_from_src
RUN $SRC/ros_from_src/build.sh
Expand Down
27 changes: 16 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ mkdir -p $BUILD

DEST=`pwd`/ros

WS=`pwd`/underlay_ws/src
echo $WS
mkdir $WS -p

# python installs

python --version | awk '{print $2}' | cut -d'.' -f1
Expand All @@ -32,7 +36,7 @@ export PYTHONPATH=$PYTHONPATH:$OPT_PYTHONPATH0:$OPT_PYTHONPATH1
echo PYTHONPATH=$PYTHONPATH:$OPT_PYTHONPATH0:$OPT_PYTHONPATH1

# catkin_pkg
cd $SRC/catkin_pkg
cd $WS/catkin_pkg
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed
ls -l $OPT_PYTHONPATH0 || ls -l $OPT_PYTHONPATH1
ls -l $OPT_PYTHONPATH0/catkin_pkg* || ls -l $OPT_PYTHONPATH1/catkin_pkg*
Expand All @@ -42,22 +46,25 @@ python -c "from catkin_pkg.package import parse_package"


# osrf pycommon
cd $SRC/osrf_pycommon
cd $WS/osrf_pycommon
# TODO(lucasw) install to $DEST
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed

# catkin tools
cd $SRC/catkin_tools
cd $WS/catkin_tools
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed

# catkin install
mkdir -p $BUILD/catkin
cd $BUILD/catkin
cmake $WS/catkin -DCATKIN_BUILD_BINARY_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=$DEST -DPYTHON_EXECUTABLE=/usr/bin/python -DSETUPTOOLS_DEB_LAYOUT=OFF -DCATKIN_INSTALL_INTO_PREFIX_ROOT=true && make && make install
python -c "import catkin; print(catkin)"
ls -l $DEST/bin
ls -l $DEST/local/bin
PATH=$PATH:$DEST/bin
PATH=$PATH:$DEST/local/bin
which catkin
catkin --version
echo $PYTHONPATH
python -c "import catkin; print(catkin)"

# console_bridge
mkdir -p $BUILD/console_bridge
Expand Down Expand Up @@ -90,7 +97,7 @@ make install
mkdir -p $BUILD/ros_environment
pwd
cd $BUILD/ros_environment
cmake $SRC/ros_environment -DCATKIN_BUILD_BINARY_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=$DEST -DPYTHON_EXECUTABLE=/usr/bin/python -DSETUPTOOLS_DEB_LAYOUT=OFF
cmake $WS/ros_environment -DCATKIN_BUILD_BINARY_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=$DEST -DPYTHON_EXECUTABLE=/usr/bin/python -DSETUPTOOLS_DEB_LAYOUT=OFF
make
make install

Expand Down Expand Up @@ -130,19 +137,17 @@ make
make install

# rospkg
cd $SRC/rospkg
cd $WS/rospkg
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed

cd $SRC/rosdistro
cd $WS/rosdistro
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed

cd $SRC/rosdep
cd $WS/rosdep
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed
rosdep init || true
rosdep update

# TODO(lucasw) already have a copy of this but needs to be in the workspace
# find / | grep setup.bash
# find / | grep catkin-config.cmake


18 changes: 3 additions & 15 deletions git_clone.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# TODO(lucasw) replace the below with submodules
# export PATH=$PATH:/usr/local/bin
set -e

SRC=`pwd`/src
echo $SRC
mkdir $SRC -p
Expand All @@ -12,21 +14,7 @@ mkdir $WS -p
# TODO(lucasw) replace these git clones with vcs
# packages that need to be cmake installed, and are ros packages in a catkin workspace
cd $WS
vcs import --input underlay_repos.yaml
vcs import --input underlay_repos.yaml --retry 5

# ROSCONSOLE1=${ROSCONSOLE:-https://github.com/ros-o/rosconsole}
# git clone $ROSCONSOLE1

# pure python
cd $SRC
git clone https://github.com/ros-infrastructure/catkin_pkg
git clone https://github.com/osrf/osrf_pycommon
git clone https://github.com/catkin/catkin_tools

# cmake installs
git clone https://github.com/ros-o/ros_environment

# runtime
git clone https://github.com/ros-infrastructure/rospkg
git clone https://github.com/ros-infrastructure/rosdistro
git clone https://github.com/lucasw/rosdep --branch disable_root_etc_ros
52 changes: 38 additions & 14 deletions underlay_repos.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
repositories:
# TODO(lucasw) separate the ros catkin packages from cmake/python packages
actionlib:
type: git
url: git@github.com:ros/actionlib.git
url: https://github.com/ros/actionlib.git
version: noetic-devel
angles:
type: git
url: git@github.com:ros/angles.git
url: https://github.com/ros/angles.git
version: master
bond_core:
type: git
url: git@github.com:ros-o/bond_core.git
url: https://github.com/ros-o/bond_core.git
version: obese-devel
catkin:
type: git
url: https://github.com/ros/catkin
version: noetic-devel
url: https://github.com/ros-o/catkin
version: obese-devel
catkin_pkg:
type: git
url: https://github.com/ros-infrastructure/catkin_pkg
# version: noetic-devel
catkin_tools:
type: git
url: https://github.com/catkin/catkin_tools
class_loader:
type: git
url: https://github.com/ros-o/class_loader
Expand All @@ -25,7 +33,7 @@ repositories:
version: 0.5-devel
common_msgs:
type: git
url: git@github.com:ros/common_msgs.git
url: https://github.com/ros/common_msgs.git
version: noetic-devel
console_bridge:
type: git
Expand Down Expand Up @@ -57,15 +65,15 @@ repositories:
version: main
geometry:
type: git
url: git@github.com:ros-o/geometry.git
url: https://github.com/ros-o/geometry.git
version: obese-devel
geometry2: # TODO(lucasw) use ros-o
geometry2:
type: git
url: git@github.com:lucasw/geometry2
version: noetic-devel
url: https://github.com/ros-o/geometry2
version: obese-devel
kdl_parser:
type: git
url: git@github.com:ros/kdl_parser.git
url: https://github.com/ros/kdl_parser.git
version: noetic-devel
message_generation:
type: git
Expand All @@ -75,13 +83,16 @@ repositories:
type: git
url: https://github.com/ros/message_runtime
version: kinetic-devel
osrf_pycommon:
type: git
url: https://github.com/osrf/osrf_pycommon
pluginlib:
type: git
url: https://github.com/ros-o/pluginlib
version: obese-devel
resource_retriever:
type: git
url: git@github.com:ros/resource_retriever.git
url: https://github.com/ros/resource_retriever.git
version: kinetic-devel
ros:
type: git
Expand All @@ -95,27 +106,40 @@ repositories:
type: git
url: https://github.com/ros/ros_comm_msgs
version: kinetic-devel
ros_environment:
type: git
url: https://github.com/ros-o/ros_environment
rosconsole:
type: git
url: https://github.com/ros-o/rosconsole
version: obese-devel
rosconsole_bridge:
type: git
url: git@github.com:ros/rosconsole_bridge.git
url: https://github.com/ros/rosconsole_bridge
version: kinetic-devel
roscpp_core:
type: git
url: https://github.com/ros-o/roscpp_core
version: obese-devel
rosdep:
type: git
url: https://github.com/lucasw/rosdep
version: disable_root_etc_ros
rosdistro:
type: git
url: https://github.com/ros-infrastructure/rosdistro
rospack:
type: git
url: https://github.com/ros/rospack
version: noetic-devel
rospkg:
type: git
url: https://github.com/ros-infrastructure/rospkg
std_msgs:
type: git
url: https://github.com/ros/std_msgs
version: kinetic-devel
urdf:
type: git
url: git@github.com:ros/urdf.git
url: https://github.com/ros/urdf.git
version: melodic-devel

0 comments on commit 67ab583

Please sign in to comment.