Skip to content

Commit

Permalink
updating build instructions to work with ubuntu 24.04- not sure how b…
Browse files Browse the repository at this point in the history
…ackwards compatible the python path changes are
  • Loading branch information
lucasw committed Apr 30, 2024
1 parent 6562759 commit 53cc173
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
10 changes: 6 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ python --version | awk '{print $2}' | cut -d'.' -f1
# TODO(lucasw) these aren't working
PYTHON_MAJOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f1`
PYTHON_MINOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f2`
OPT_PYTHONPATH=$DEST/lib/python$PYTHON_MAJOR_VERSION.$PYTHON_MINOR_VERSION/site-packages/
OPT_PYTHONPATH=$DEST/local/lib/python$PYTHON_MAJOR_VERSION.$PYTHON_MINOR_VERSION/dist-packages/
mkdir -p $OPT_PYTHONPATH
echo $PYTHONPATH
export PYTHONPATH=$PYTHONPATH:$OPT_PYTHONPATH
echo PYTHONPATH=\$PYTHONPATH:$OPT_PYTHONPATH
Expand All @@ -33,7 +34,7 @@ echo PYTHONPATH=\$PYTHONPATH:$OPT_PYTHONPATH
cd $SRC/catkin_pkg
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed
ls -l $OPT_PYTHONPATH
ls -l $OPT_PYTHONPATH/catkin_pkg
ls -l $OPT_PYTHONPATH/catkin_pkg*
# python -c "import sys; print(sys.path)"
python -c "import catkin_pkg; print(catkin_pkg.__version__)"
python -c "from catkin_pkg.package import parse_package"
Expand All @@ -55,6 +56,7 @@ cmake $WS/catkin -DCATKIN_BUILD_BINARY_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=$DEST -
python -c "import catkin; print(catkin)"
ls -l $DEST/bin
PATH=$PATH:$DEST/bin
PATH=$PATH:$DEST/local/bin

# console_bridge
mkdir -p $BUILD/console_bridge
Expand Down Expand Up @@ -144,7 +146,7 @@ rosdep update
cd $WS/..
catkin init
source $DEST/setup.bash
catkin config
catkin config --install --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated -DCATKIN_ENABLE_TESTING=False
rospack list

# rosdep install --from-paths src --ignore-src -r -s # do a dry-run first
Expand All @@ -154,7 +156,7 @@ echo $CMAKE_PREFIX_PATH
# TODO(lucasw) put this in WS to begin with
# TODO(lucasw) was this needed? Need a bunch of CATKIN_IGNOREs in every package/test dir to make it build
# ln -s $SRC/ros $WS/ros
catkin build --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated
catkin build
source devel/setup.bash
rospack list
# TODO(lucasw) run tests
13 changes: 13 additions & 0 deletions env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/bash
# source ros_from_src/env.sh
export ROS_DEST=`pwd`/ros
export PATH=$PATH:$ROS_DEST/bin
export PATH=$PATH:$ROS_DEST/local/bin

PYTHON_MAJOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f1`
PYTHON_MINOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f2`
OPT_PYTHONPATH=$ROS_DEST/local/lib/python$PYTHON_MAJOR_VERSION.$PYTHON_MINOR_VERSION/dist-packages/

export PYTHONPATH=$PYTHONPATH:$OPT_PYTHONPATH
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$ROS_DEST:$ROS_DEST/lib/cmake

6 changes: 3 additions & 3 deletions git_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ git clone https://github.com/ros/rospack
git clone https://github.com/ros/genmsg

# ros packages, regular catkin build only for these
git clone https://github.com/ros/ros_comm
git clone https://github.com/ros/roscpp_core
git clone https://github.com/ros-o/ros_comm
git clone https://github.com/ros-o/roscpp_core
git clone https://github.com/ros/ros_comm_msgs
git clone https://github.com/ros/message_generation
git clone https://github.com/ros/gencpp
git clone https://github.com/ros-o/gencpp
git clone https://github.com/jsk-ros-pkg/geneus
git clone https://github.com/RethinkRobotics-opensource/gennodejs
git clone https://github.com/ros/genlisp
Expand Down

0 comments on commit 53cc173

Please sign in to comment.