Skip to content

Commit

Permalink
Porting depthai_ros v2.7.1 to Foxy (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafadam authored Apr 25, 2023
1 parent ebc6d6f commit 35eb3ab
Show file tree
Hide file tree
Showing 155 changed files with 6,973 additions and 410 deletions.
46 changes: 46 additions & 0 deletions .devcontainer/devcontainer.json
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"
]
}
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ A clear and concise description of what the bug is.
**Minimal Reproducible Example**
Append the MRE to the bug report, [instructions here](https://docs.luxonis.com/en/latest/pages/support/#creating-minimal-reproducible-example)

If available launch files don't work in your case, please check if you also get errors while running:
- `stereo_inertial_node` in `depthai_examples`
- `camera` in `depthai_ros_driver`
- In case both fail to run, please check if you can run [the default python demo app](https://docs.luxonis.com/en/latest/#demo-script)

**Expected behavior**
A clear and concise description of what you expected to happen.

Expand All @@ -28,10 +33,16 @@ If applicable, add screenshots to help explain your problem.

Please also provide a screenshot of your pipeline using the [DepthAI Pipeline Graph](https://github.com/geaxgx/depthai_pipeline_graph).

You can save it in `depthai_ros_driver`, either by calling `/save_pipeline` ROS service, or by setting parameter `camera.i_pipeline_dump` in ROS 2 or `camera_i_pipeline_dump` in ROS. Pipeline dump is saved to `/tmp/pipeline.json`.

**Attach system log**
- Provide output of [log_system_information.py](https://github.com/luxonis/depthai/blob/main/log_system_information.py)
- Which OS/OS version are you using?
- Which ROS version are you using?
- Is `depthai-ros` built from source or installed from apt?
- Is `depthai/depthai-core` library installed from rosdep or manually? For rosdep install, check if `ros-<rosdistro>-depthai` package is installed, manual install can be checked with `ldconfig -p | grep depthai`
- Please include versions of following packages - `apt show ros-$ROS_DISTRO-depthai ros-$ROS_DISTRO-depthai-ros ros-$ROS_DISTRO-depthai-bridge ros-$ROS_DISTRO-depthai-ros-msgs ros-$ROS_DISTRO-depthai-ros-driver`
- To get additional logs, set `DEPTHAI_DEBUG=1` and paste the logs, either from command line or from latest log in `~/.ros/log`

**Additional context**
Add any other context about the problem here.
10 changes: 5 additions & 5 deletions .github/workflows/main.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2.3.4
- uses: ros-tooling/setup-ros@0.4.1
- uses: actions/checkout@v3.3.0
- uses: ros-tooling/setup-ros@0.5.0
with:
required-ros-distributions: ${{ env.ROS_DISTRO }}
- uses: ros-tooling/[email protected]
Expand All @@ -49,8 +49,8 @@ jobs:
matrix:
linter: [xmllint, pep257, lint_cmake]
steps:
- uses: actions/checkout@v2.3.4
- uses: ros-tooling/setup-ros@0.4.1
- uses: actions/checkout@v3.3.0
- uses: ros-tooling/setup-ros@0.5.0
with:
required-ros-distributions: ${{ env.ROS_DISTRO }}
- uses: ros-tooling/[email protected]
Expand Down Expand Up @@ -116,5 +116,5 @@ jobs:
push: ${{ env.PUSH }}
no-cache: true
tags: |
luxonis/depthai-ros:${{ env.ROS_DISTRO }}-${{ steps.vars.outputs.short_ref }}
luxonis/depthai-ros:${{ steps.vars.outputs.short_ref }}
luxonis/depthai-ros:${{ env.ROS_DISTRO }}-latest
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.json
.vscode
devel
__pycache__
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
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"]
Loading

0 comments on commit 35eb3ab

Please sign in to comment.