-
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
Open
pvela2017
wants to merge
13
commits into
Ekumen-OS:main
Choose a base branch
from
pvela2017:amcl3_demo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
569f821
Add amcl3 demo
pvela2017 3a6ccdb
Add jazzy image
pvela2017 b609953
Add crop filter
pvela2017 2839e03
Improve jazzy instructions
pvela2017 678dfe1
Add ignore vdb files
pvela2017 0da26dd
Change files permission
pvela2017 b15a8cc
Add EOF
pvela2017 64e5615
Fix nit and add particle markers
pvela2017 471d716
Add EOF
pvela2017 150be6e
Change to rosdep dependencies
pvela2017 0975f94
Fix covariance calculation
pvela2017 880d938
Activate particle markers
pvela2017 a5d0485
Fix formatting
pvela2017 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 +1,3 @@ | ||
.vscode | ||
*.db3 | ||
*.vdb |
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
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
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,31 +1,42 @@ | ||
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' | ||
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 |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repositories: | ||
beluga: | ||
type: git | ||
url: https://github.com/pvela2017/beluga.git | ||
version: likelihood_field_3d_model |
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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
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 \ | ||
python3-pip \ | ||
mc \ | ||
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"] |
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 |
---|---|---|
|
@@ -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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.