Skip to content

Commit

Permalink
Humble
Browse files Browse the repository at this point in the history
  • Loading branch information
Ar-Ray-code committed May 28, 2022
1 parent af3d983 commit cbfa907
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvidia/cuda:11.4.2-cudnn8-devel-ubuntu20.04
FROM nvidia/cuda:11.7.0-devel-ubuntu22.04

ENV TZ=Asia/Tokyo
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
Expand All @@ -17,9 +17,9 @@ RUN apt update && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
apt update && \
apt install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" keyboard-configuration && \
apt install -y ros-foxy-desktop && \
apt install -y ros-humble-desktop && \
apt install -y python3-colcon-common-extensions && \
apt install -y ros-foxy-v4l2-camera && \
apt install -y ros-humble-v4l2-camera && \
apt install -y git && \
apt install -y xterm && \
apt install -y wget && \
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# darknet-ros-fp16

darknet_ros + ROS2 Galactic + OpenCV4 + CUDA 11.2 + __CUDNN (FP16)__ :fire::fire::fire:
darknet_ros + ROS2 Humble + OpenCV4 + CUDA 11.2 + __CUDNN (FP16)__ :fire::fire::fire:

- [English (GitHub Wiki)](https://github.com/Ar-Ray-code/darknet_ros_fp16/wiki/Darknet_ros_FP16-Report-(1.3x-faster)-%F0%9F%94%A5)
- [Japanese (zenn)](https://zenn.dev/array/articles/4c82fc8382e62d)
Expand All @@ -25,8 +25,8 @@ darknet_ros + ROS2 Galactic + OpenCV4 + CUDA 11.2 + __CUDNN (FP16)__ :fire::fire

- Ubuntu Desktop + NVIDIA Graphics Driver
- v4l2-camera (Connect to `/dev/video*`)
- NVIDIA Graphics Card (Volta , Turing , Ampere)
- Docker + [NVIDIA-Docker](https://github.com/NVIDIA/nvidia-docker)
- NVIDIA Graphics Card (Volta , Turing , Ampere)
- Docker + [NVIDIA-Docker](https://github.com/NVIDIA/nvidia-docker)
- This docker image is using `cuda:11.4.2` .

- xhost (To install xhost , run `$ sudo apt install xorg` .)
Expand All @@ -37,7 +37,7 @@ darknet_ros + ROS2 Galactic + OpenCV4 + CUDA 11.2 + __CUDNN (FP16)__ :fire::fire
xhost +
# Pull docker image from dockerhub
docker pull ray255ar/darknet-ros-fp16
# Run
# Run
docker run --rm -it \
--device /dev/video0:/dev/video0:mwr \
-e DISPLAY=$DISPLAY --runtime nvidia \
Expand All @@ -50,15 +50,15 @@ docker run --rm -it \
## Installation :turtle:

### Requirements
- ROS2 Foxy
- ROS2 Humble
- OpenCV 4.2
- CUDA 10 or 11 (tested with CUDA 11.5.119)
- cuDNN 8.3 ([Installation tutorial](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html))

### Installation
```bash
$ sudo apt install ros-foxy-desktop ros-foxy-v4l2-camera
$ source /opt/ros/foxy/setup.bash
$ sudo apt install ros-humble-desktop ros-humble-v4l2-camera
$ source /opt/ros/humble/setup.bash
$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src
$ git clone --recursive https://github.com/Ar-Ray-code/darknet_ros_yolov4.git
Expand All @@ -80,7 +80,7 @@ set(FP16_ENABLE ON)

#### cuDNN (FP16)

Darknet can be made even faster by enabling CUDNN_HALF(FP16), but you need to specify the appropriate architecture.
Darknet can be made even faster by enabling CUDNN_HALF(FP16), but you need to specify the appropriate architecture.

FP16 is automatically enabled for GPUs of the Turing or Ampere architecture if the appropriate cuDNN is installed. To disable it, change line 12 to `set(FP16_ENABLE OFF)`.

Expand Down Expand Up @@ -115,7 +115,7 @@ set(DOWNLOAD_YOLOV4_MISH OFF)
Connect your webcam to your PC.

```bash
$ source /opt/ros/foxy/setup.bash
$ source /opt/ros/humble/setup.bash
$ source ~/ros2_ws/install/local_setup.bash
$ ros2 launch darknet_ros demo-v4-tiny.launch.py
```
Expand Down
2 changes: 1 addition & 1 deletion yolov4-tiny-docker.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
source /opt/ros/foxy/setup.bash
source /opt/ros/humble/setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
colcon build --symlink-install
source install/setup.bash
Expand Down

0 comments on commit cbfa907

Please sign in to comment.