-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Porting
depthai_ros
v2.7.1 to Foxy (#224)
- Loading branch information
Showing
155 changed files
with
6,973 additions
and
410 deletions.
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
{ | ||
"dockerFile": "../src/depthai-ros/Dockerfile", | ||
"build": { | ||
"args": {"BUILD_SEQUENTIAL": "1", | ||
"USE_RVIZ": "1"} | ||
}, | ||
"remoteUser": "root", | ||
"runArgs": [ | ||
"--device=/dev/ttyUSB0", | ||
"--privileged", | ||
"--network=host", | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt=seccomp:unconfined", | ||
"--security-opt=apparmor:unconfined", | ||
"--volume=/dev:/dev", | ||
"--volume=/tmp/.X11-unix:/tmp/.X11-unix" | ||
], | ||
"containerEnv": { "DISPLAY": "${localEnv:DISPLAY}" }, | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"zsh": { | ||
"path": "zsh" | ||
}, | ||
"bash": { | ||
"path": "bash" | ||
} | ||
|
||
}, | ||
"terminal.integrated.defaultProfile.linux": "zsh" | ||
}, | ||
"extensions": [ | ||
"dotjoshjohnson.xml", | ||
"ms-azuretools.vscode-docker", | ||
"ms-iot.vscode-ros", | ||
"ms-python.python", | ||
"ms-vscode.cpptools", | ||
"redhat.vscode-yaml", | ||
"smilerobotics.urdf", | ||
"streetsidesoftware.code-spell-checker", | ||
"twxs.cmake", | ||
"yzhang.markdown-all-in-one", | ||
"augustocdias.tasks-shell-input" | ||
] | ||
} |
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,4 +1,3 @@ | ||
*.json | ||
.vscode | ||
devel | ||
__pycache__ | ||
|
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,23 +1,25 @@ | ||
ARG ROS_DISTRO=humble | ||
ARG ROS_DISTRO=foxy | ||
FROM ros:${ROS_DISTRO}-ros-base | ||
ARG USE_RVIZ | ||
ARG BUILD_SEQUENTIAL=0 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends software-properties-common git libusb-1.0-0-dev wget zsh python3-colcon-common-extensions | ||
|
||
|
||
ENV DEBIAN_FRONTEND=dialog | ||
RUN sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | ||
|
||
ENV WS=/ws | ||
RUN mkdir -p $WS/src | ||
COPY ./ .$WS/src/depthai_ros | ||
RUN cd .$WS/ && rosdep install --from-paths src --ignore-src -y | ||
RUN if [ "$BUILD_SEQUENTIAL" = "1" ] ; then cd .$WS/ && . /opt/ros/${ROS_DISTRO}/setup.sh && colcon build --executor sequential --cmake-args -DCMAKE_BUILD_TYPE=Release ; else cd .$WS/ && . /opt/ros/${ROS_DISTRO}/setup.sh && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release; fi | ||
COPY ./ .$WS/src/depthai-ros | ||
RUN cd .$WS/ && rosdep install --from-paths src --ignore-src -y | ||
|
||
RUN cd .$WS/ && . /opt/ros/${ROS_DISTRO}/setup.sh && ./src/depthai-ros/build.sh -s $BUILD_SEQUENTIAL -r 1 -m 1 | ||
RUN if [ "$USE_RVIZ" = "1" ] ; then echo "RVIZ ENABLED" && sudo apt install -y ros-${ROS_DISTRO}-rviz2 ros-${ROS_DISTRO}-rviz-imu-plugin ; else echo "RVIZ NOT ENABLED"; fi | ||
RUN echo "if [ -f ${WS}/install/setup.zsh ]; then source ${WS}/install/setup.zsh; fi" >> $HOME/.zshrc | ||
RUN echo 'eval "$(register-python-argcomplete3 ros2)"' >> $HOME/.zshrc | ||
RUN echo 'eval "$(register-python-argcomplete3 colcon)"' >> $HOME/.zshrc | ||
RUN echo "if [ -f ${WS}/install/setup.bash ]; then source ${WS}/install/setup.bash; fi" >> $HOME/.bashrc | ||
ENTRYPOINT [ "/ws/src/depthai_ros/entrypoint.sh" ] | ||
ENTRYPOINT [ "/ws/src/depthai-ros/entrypoint.sh" ] | ||
CMD ["zsh"] |
Oops, something went wrong.