-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add amcl3 demo #9
base: main
Are you sure you want to change the base?
Changes from 6 commits
569f821
3a6ccdb
b609953
2839e03
678dfe1
0da26dd
b15a8cc
64e5615
471d716
150be6e
0975f94
880d938
a5d0485
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.vscode | ||
*.db3 | ||
*.vdb |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
alias demo_build='cd ~/ws \ | ||
&& colcon build --symlink-install \ | ||
&& source install/setup.bash' | ||
if [ "${ROSDISTRO}" == "humble" ]; then | ||
alias demo_build='cd ~/ws \ | ||
&& colcon build --symlink-install \ | ||
&& source install/setup.bash' | ||
|
||
alias lidar_beam_model_hallway_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_hallway_beam_localization.launch.py' | ||
alias lidar_beam_model_hallway_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_hallway_beam_localization.launch.py' | ||
|
||
alias lidar_likelihood_model_hallway_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_hallway_likelihood_localization.launch.py' | ||
alias lidar_likelihood_model_hallway_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_hallway_likelihood_localization.launch.py' | ||
|
||
alias lidar_beam_model_office_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_office_beam_localization.launch.py' | ||
alias lidar_beam_model_office_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_office_beam_localization.launch.py' | ||
|
||
alias lidar_likelihood_model_office_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_office_likelihood_localization.launch.py' | ||
alias lidar_likelihood_model_office_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_lidar_localization demo_office_likelihood_localization.launch.py' | ||
|
||
alias apriltags_localization_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_fiducial_localization demo_apriltags_based_localization.launch.py' | ||
alias apriltags_localization_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_fiducial_localization demo_apriltags_based_localization.launch.py' | ||
|
||
alias light_beacons_localization_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_bearing_localization demo_light_beacons_based_localization.launch.py' | ||
alias light_beacons_localization_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_bearing_localization demo_light_beacons_based_localization.launch.py' | ||
|
||
alias nav2_integration_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_nav2_integration demo_office_navigation.launch.py' | ||
|
||
else | ||
alias demo_build='cd ~/ws \ | ||
&& colcon build --symlink-install --packages-up-to beluga_demo_amcl3_localization --cmake-args -DCMAKE_BUILD_TYPE=Release -DUSE_OPENVDB=ON \ | ||
&& source install/setup.bash' | ||
|
||
alias amcl3_localization_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_amcl3_localization demo_botanic_garden_amcl3_localization.launch.py' | ||
fi | ||
|
||
alias nav2_integration_demo='cd ~/ws \ | ||
&& source install/setup.bash \ | ||
&& ros2 launch beluga_demo_nav2_integration demo_office_navigation.launch.py' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repositories: | ||
beluga: | ||
type: git | ||
url: https://github.com/pvela2017/beluga.git | ||
version: likelihood_field_3d_model |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
FROM ros:jazzy-ros-base AS cacher | ||
|
||
WORKDIR /ws/src | ||
|
||
COPY localization/beluga_demo_amcl3_localization beluga_demo/localization/ | ||
|
||
RUN mkdir -p /tmp/ws/src \ | ||
&& find ./ -name "package.xml" | xargs cp --parents -t /tmp/ws/src \ | ||
&& find ./ -name "COLCON_IGNORE" | xargs cp --parents -t /tmp/ws/src \ | ||
|| true | ||
|
||
FROM ros:jazzy-ros-base AS builder | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y \ | ||
ccache \ | ||
curl \ | ||
gdb \ | ||
git \ | ||
libopenvdb-dev \ | ||
python3-pip \ | ||
mc \ | ||
ros-jazzy-pcl-ros \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pvela2017 why adding this here instead of in the corresponding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed in 150be6e |
||
tmux \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PIP_BREAK_SYSTEM_PACKAGES 1 | ||
|
||
RUN pip install \ | ||
pre-commit==2.20.0 | ||
|
||
ARG USER=developer | ||
ARG GROUP=ekumen | ||
|
||
# Drop ubuntu user to avoid fixuid clashes. | ||
RUN deluser ubuntu | ||
|
||
RUN addgroup --gid 1000 $GROUP \ | ||
&& adduser --uid 1000 --ingroup $GROUP --home /home/$USER --shell /bin/sh --disabled-password --gecos "" $USER \ | ||
&& adduser $USER sudo \ | ||
&& adduser $USER dialout \ | ||
&& echo "$USER ALL=NOPASSWD: ALL" >> /etc/sudoers.d/$USER | ||
|
||
COPY docker/files/fixuid_config.yml /etc/fixuid/config.yml | ||
RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.4-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - \ | ||
&& chmod 4755 /usr/local/bin/fixuid \ | ||
&& cd /etc/fixuid \ | ||
&& sed -i "s/_USER_/$USER/" config.yml \ | ||
&& sed -i "s/_GROUP_/$GROUP/" config.yml | ||
|
||
USER $USER:$GROUP | ||
|
||
ENV USER_WS /home/$USER/ws | ||
RUN mkdir -p /$USER_WS | ||
|
||
WORKDIR /tmp | ||
|
||
WORKDIR $USER_WS | ||
|
||
RUN colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml \ | ||
&& colcon mixin update default | ||
COPY --chown=$USER:$GROUP docker/files/colcon_defaults.yaml /home/$USER/.colcon/defaults.yaml | ||
RUN mkdir -p /home/$USER/.ccache $USER_WS/src | ||
|
||
# | ||
# Install base system external dependencies | ||
|
||
COPY docker/files/jazzy_base.repos /tmp/jazzy_base.repos | ||
RUN cd src/ \ | ||
&& mkdir -p external-deps \ | ||
&& cd external-deps \ | ||
&& vcs import < /tmp/jazzy_base.repos | ||
|
||
RUN sudo apt-get update \ | ||
&& . /opt/ros/jazzy/setup.sh \ | ||
&& rosdep update \ | ||
&& rosdep install -i -y --from-path src \ | ||
&& sudo rm -rf /var/lib/apt/lists/* | ||
|
||
# | ||
# Install project dependencies | ||
|
||
USER root | ||
ENV PIP_BREAK_SYSTEM_PACKAGES 1 | ||
|
||
COPY --from=cacher --chown=$USER:$GROUP /tmp/ws/ $USER_WS/ | ||
RUN sudo apt-get update \ | ||
&& . /opt/ros/jazzy/setup.sh \ | ||
&& rosdep update \ | ||
&& rosdep install -i -y --from-path src \ | ||
&& sudo rm -rf /var/lib/apt/lists/* | ||
|
||
# | ||
# Install aliases and setup environment | ||
|
||
COPY --chown=$USER:$GROUP docker/files/DOTaliases /home/$USER/.bash_aliases | ||
|
||
RUN bash -c "echo '. /opt/ros/jazzy/setup.bash' >> /home/$USER/.bashrc" | ||
RUN bash -c "echo 'ros2 daemon start' >> /home/$USER/.bashrc" | ||
|
||
ENV WITHIN_DEV 1 | ||
ENV MAKEFLAGS "-j 2" | ||
|
||
ENV SHELL /bin/bash | ||
ENTRYPOINT ["fixuid", "-q", "/ros_entrypoint.sh", "/bin/bash"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,10 +66,31 @@ while [[ "$1" != "" ]]; do | |
esac | ||
done | ||
|
||
DOCKER_EXTRA_ARGS="" | ||
BASE_PATH="$(cd .. && pwd)" | ||
|
||
if [ "${ROSDISTRO}" == "humble" ]; then | ||
DOCKER_EXTRA_ARGS="${DOCKER_EXTRA_ARGS} -v /home/developer/ws/src/beluga_demo/localization/beluga_demo_amcl3_localization" | ||
fi | ||
|
||
if [ "${ROSDISTRO}" == "jazzy" ]; then | ||
EXCLUDE_FOLDERS=("common" | ||
"integration" | ||
"misc" | ||
"localization/beluga_demo_bearing_localization" | ||
"localization/beluga_demo_fiducial_localization" | ||
"localization/beluga_demo_lidar_localization" | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pvela2017 I'm a bit ambivalent about this, but I can't think of a better solution. CC @glpuga for thoughts. |
||
|
||
for dir in ${EXCLUDE_FOLDERS[@]}; do | ||
DOCKER_EXTRA_ARGS="${DOCKER_EXTRA_ARGS} -v /home/developer/ws/src/beluga_demo/${dir}" | ||
done | ||
fi | ||
|
||
# Note: The `--build` flag was added to docker compose run after | ||
# https://github.com/docker/compose/releases/tag/v2.13.0. | ||
# We have this for convenience and compatibility with previous versions. | ||
# Otherwise, we could just forward the script arguments to the run verb. | ||
[[ "$BUILD" = true ]] && docker compose build beluga-demo-dev | ||
|
||
PRIVILEGED_CONTAINER=$PRIVILEGED_CONTAINER USERID=$(id -u) GROUPID=dialout docker compose run --rm beluga-demo-dev | ||
PRIVILEGED_CONTAINER=$PRIVILEGED_CONTAINER USERID=$(id -u) GROUPID=dialout docker compose run -v ${BASE_PATH}:/home/developer/ws/src/beluga_demo ${DOCKER_EXTRA_ARGS} --rm beluga-demo-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 this needs to change before merging.