Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Package Specific Dependencies from Image to package.xml #244

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ubcsailbot/sailbot_workspace/dev:fix-building-pre-base
FROM ghcr.io/ubcsailbot/sailbot_workspace/dev:combined-pip3-installs2

# Copy configuration files (e.g., .vimrc) from config/ to the container's home directory
ARG USERNAME=ros
Expand Down
14 changes: 2 additions & 12 deletions .devcontainer/base-dev/base-dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,6 @@ RUN apt-get update \
&& rosdep init || echo "rosdep already initialized"
ENV DEBIAN_FRONTEND=

# install base python3 dependencies
RUN pip3 install \
# from local pathfinding
plotly \
pyproj \
flask \
shapely

# root bash configuration
ENV ROS_WORKSPACE=/workspaces/sailbot_workspace
COPY update-bashrc.sh /sbin/update-bashrc
Expand Down Expand Up @@ -377,10 +369,8 @@ ENV DEBIAN_FRONTEND=

# install dev python3 dependencies
RUN pip3 install \
# to be able to run juypter notebooks
ipykernel \
# for integration_tests package
types-PyYAML
# for juypter notebooks
ipykernel

# install other helpful apt packages
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
14 changes: 14 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ else
warn "VCS disabled. Skipping project repository imports..."
fi

# Create/overwrite the custom rosdep list file
CUSTOM_ROSDEP_LIST="/etc/ros/rosdep/sources.list.d/20-sailbot.list"
CUSTOM_ROSDEP_FILE="custom-rosdep.yaml"
echo "# sailbot" | sudo tee $CUSTOM_ROSDEP_LIST > /dev/null
for DIR in $ROS_WORKSPACE/src/*; do
if [ -d "$DIR" ]; then
FILE="$DIR/$CUSTOM_ROSDEP_FILE"
if [ -f $FILE ]; then
echo "Adding $FILE to $CUSTOM_ROSDEP_LIST"
echo "yaml file://$FILE" | sudo tee --append $CUSTOM_ROSDEP_LIST > /dev/null
fi
fi
done

sudo apt-get update
rosdep update --rosdistro $ROS_DISTRO
rosdep install --from-paths src --ignore-src -y --rosdistro $ROS_DISTRO
4 changes: 4 additions & 0 deletions src/integration_tests/custom-rosdep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python3-pyyaml-types-pip:
ubuntu:
pip:
packages: [types-PyYAML]
4 changes: 4 additions & 0 deletions src/integration_tests/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
<maintainer email="[email protected]">Henry Huang</maintainer>
<license>MIT</license>

<!--ROS Dependencies-->
<exec_depend>rclpy</exec_depend>
<exec_depend>custom_interfaces</exec_depend>

<!--Python Dependencies-->
<exec_depend>python3-pyyaml-types-pip</exec_depend>

<export>
<build_type>ament_python</build_type>
</export>
Expand Down
2 changes: 1 addition & 1 deletion src/polaris.repos
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repositories:
local_pathfinding:
type: git
url: https://github.com/UBCSailbot/local_pathfinding
version: main
version: user/SPDonaghy/migrate-package-specific-dependencies-242

network_systems:
type: git
Expand Down