Skip to content

Commit

Permalink
removed yolo_ros
Browse files Browse the repository at this point in the history
  • Loading branch information
KalanaRatnayake committed Jul 22, 2024
1 parent 8c2068f commit f073d72
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 91 deletions.
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ Clone this repository with and install dependencies.

```bash
git clone https://github.com/KalanaRatnayake/boxmot_ros.git
git clone https://github.com/KalanaRatnayake/yolo_ros.git
git clone https://github.com/KalanaRatnayake/detection_msgs.git
pip3 install -r boxmot_ros/requirements.txt
pip3 install -r yolo_ros/requirements.txt
Expand All @@ -82,14 +81,7 @@ colcon build
```
### Start the system

To use the yolo detection, run launch file in a terminal,

```bash
source ./install/setup.bash
ros2 launch yolo_ros yolo.launch.py
```

To use the boxmot tracking, run the launch file in a seperate terminal, run,
To use the boxmot tracking, run the launch file in terminal, run,

```bash
source ./install/setup.bash
Expand All @@ -101,8 +93,6 @@ ros2 launch boxmot_ros boxmot.launch.py

## Parameter decription

For parameters missing in thefollowing table (`yolo_ros` parameters) check the respective [yolo_ros parameters](https://github.com/KalanaRatnayake/yolo_ros#parameter-decription).

| ROS Parameter | Docker ENV parameter | Default Value | Description |
| :--- | :--- | :---: | :--- |
| tracking_model | TRACKING_MODEL | `deepocsort` | Model to be used for tracking. see [1] for default models |
Expand Down
13 changes: 1 addition & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ RUN apt-get clean
WORKDIR ${WORKSPACE_ROOT}/src

RUN git clone https://github.com/KalanaRatnayake/boxmot_ros.git
RUN git clone https://github.com/KalanaRatnayake/yolo_ros.git
RUN git clone https://github.com/KalanaRatnayake/detection_msgs.git

RUN pip3 install --no-cache-dir -r ${WORKSPACE_ROOT}/src/boxmot_ros/requirements.txt
RUN pip3 install --no-cache-dir -r ${WORKSPACE_ROOT}/src/yolo_ros/requirements.txt

RUN rosdep install --from-paths ${WORKSPACE_ROOT}/src -y --ignore-src

Expand Down Expand Up @@ -92,16 +90,7 @@ ENTRYPOINT [ "/workspace_entrypoint.sh" ]

WORKDIR ${WORKSPACE_ROOT}

CMD ros2 launch boxmot_ros docker.launch.py yolo_model:=$YOLO_MODEL \
input_rgb_topic:=$INPUT_RGB_TOPIC \
input_depth_topic:=$INPUT_DEPTH_TOPIC \
subscribe_depth:=$SUBSCRIBE_DEPTH \
yolo_publish_annotated_image:=$YOLO_PUBLISH_ANNOTATED_IMAGE \
yolo_annotated_topic:=$YOLO_ANNOTATED_TOPIC \
yolo_detailed_topic:=$YOLO_DETAILED_TOPIC \
yolo_threshold:=$YOLO_THRESHOLD \
yolo_device:=$YOLO_DEVICE \
tracking_model:=$TRACKING_MODEL \
CMD ros2 launch boxmot_ros docker.launch.py tracking_model:=$TRACKING_MODEL \
reid_model:=$REID_MODEL \
input_topic:=$INPUT_TOPIC \
boxmot_publish_annotated_image:=$BOXMOT_PUBLISH_ANNOTATED_IMAGE \
Expand Down
11 changes: 1 addition & 10 deletions docker/Dockerfile.jetson-nano
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,7 @@ ENTRYPOINT [ "/workspace_entrypoint.sh" ]

WORKDIR ${WORKSPACE_ROOT}

CMD ros2 launch boxmot_ros docker.launch.py yolo_model:=$YOLO_MODEL \
input_rgb_topic:=$INPUT_RGB_TOPIC \
input_depth_topic:=$INPUT_DEPTH_TOPIC \
subscribe_depth:=$SUBSCRIBE_DEPTH \
yolo_publish_annotated_image:=$YOLO_PUBLISH_ANNOTATED_IMAGE \
yolo_annotated_topic:=$YOLO_ANNOTATED_TOPIC \
yolo_detailed_topic:=$YOLO_DETAILED_TOPIC \
yolo_threshold:=$YOLO_THRESHOLD \
yolo_device:=$YOLO_DEVICE \
tracking_model:=$TRACKING_MODEL \
CMD ros2 launch boxmot_ros docker.launch.py tracking_model:=$TRACKING_MODEL \
reid_model:=$REID_MODEL \
input_topic:=$INPUT_TOPIC \
boxmot_publish_annotated_image:=$BOXMOT_PUBLISH_ANNOTATED_IMAGE \
Expand Down
10 changes: 0 additions & 10 deletions docker/compose.amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ services:
- BOXMOT_DETAILED_TOPIC=/boxmot_ros/tracking_result
- BOXMOT_THRESHOLD=0.25
- BOXMOT_DEVICE='0'
- YOLO_MODEL=yolov10x.pt
# - YOLO_MODEL=weights/yolov9t.pt ---> for custom weights
- INPUT_RGB_TOPIC=/camera/color/image_raw
- INPUT_DEPTH_TOPIC=/camera/depth/points
- SUBSCRIBE_DEPTH=True
- YOLO_PUBLISH_ANNOTATED_IMAGE=True
- YOLO_ANNOTATED_TOPIC=/yolo_ros/annotated_image
- YOLO_DETAILED_TOPIC=/yolo_ros/detection_result
- YOLO_THRESHOLD=0.25
- YOLO_DEVICE='0'
restart: unless-stopped
# privileged: true
network_mode: host
Expand Down
10 changes: 0 additions & 10 deletions docker/compose.jnano.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ services:
- BOXMOT_DETAILED_TOPIC=/boxmot_ros/tracking_result
- BOXMOT_THRESHOLD=0.25
- BOXMOT_DEVICE='0'
- YOLO_MODEL=yolov10x.pt
# - YOLO_MODEL=weights/yolov9t.pt ---> for custom weights
- INPUT_RGB_TOPIC=/camera/color/image_raw
- INPUT_DEPTH_TOPIC=/camera/depth/points
- SUBSCRIBE_DEPTH=True
- YOLO_PUBLISH_ANNOTATED_IMAGE=True
- YOLO_ANNOTATED_TOPIC=/yolo_ros/annotated_image
- YOLO_DETAILED_TOPIC=/yolo_ros/detection_result
- YOLO_THRESHOLD=0.25
- YOLO_DEVICE='0'
restart: unless-stopped
privileged: true
network_mode: host
Expand Down
36 changes: 0 additions & 36 deletions launch/docker.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@


def generate_launch_description():
yolo_yolo_model_param = DeclareLaunchArgument('yolo_model', default_value="yolov9s.pt")
yolo_input_rgb_topic_param = DeclareLaunchArgument('input_rgb_topic', default_value="/camera/color/image_raw")
yolo_input_depth_topic_param = DeclareLaunchArgument('input_depth_topic', default_value="/camera/depth/points")
yolo_subscribe_depth_param = DeclareLaunchArgument('subscribe_depth', default_value="True")
yolo_publish_annotated_image_param = DeclareLaunchArgument('yolo_publish_annotated_image', default_value="True")
yolo_annotated_topic_param = DeclareLaunchArgument('yolo_annotated_topic', default_value="/yolo_ros/annotated_image")
yolo_detailed_topic_param = DeclareLaunchArgument('yolo_detailed_topic', default_value="/yolo_ros/detection_result")
yolo_threshold_param = DeclareLaunchArgument('yolo_threshold', default_value="0.25")
yolo_device_param = DeclareLaunchArgument('yolo_device', default_value="'0'")

boxmot_yolo_model_param = DeclareLaunchArgument('tracking_model', default_value="deepocsort")
boxmot_input_rgb_topic_param = DeclareLaunchArgument('reid_model', default_value="osnet_x0_25_msmt17.pt")
Expand All @@ -29,22 +20,6 @@ def generate_launch_description():
boxmot_threshold_param = DeclareLaunchArgument('boxmot_threshold', default_value="0.25")
boxmot_device_param = DeclareLaunchArgument('boxmot_device', default_value="'0'")

yolo_ros_node = launch_ros.actions.Node(package='yolo_ros',
executable='yolo_ros',
output='both',
parameters=[{
'yolo_model': LaunchConfiguration('yolo_model'),
'input_rgb_topic': LaunchConfiguration('input_rgb_topic'),
'input_depth_topic': LaunchConfiguration('input_depth_topic'),
'subscribe_depth': LaunchConfiguration('subscribe_depth'),
'publish_annotated_image': LaunchConfiguration('yolo_publish_annotated_image'),
'annotated_topic': LaunchConfiguration('yolo_annotated_topic'),
'detailed_topic': LaunchConfiguration('yolo_detailed_topic'),
'threshold': LaunchConfiguration('yolo_threshold'),
'device': LaunchConfiguration('yolo_device'),
}]
)

boxmot_ros_node = launch_ros.actions.Node(package='boxmot_ros',
executable='boxmot_ros',
output='both',
Expand All @@ -62,16 +37,6 @@ def generate_launch_description():

ld = LaunchDescription()

ld.add_action(yolo_yolo_model_param)
ld.add_action(yolo_input_rgb_topic_param)
ld.add_action(yolo_input_depth_topic_param)
ld.add_action(yolo_subscribe_depth_param)
ld.add_action(yolo_publish_annotated_image_param)
ld.add_action(yolo_annotated_topic_param)
ld.add_action(yolo_detailed_topic_param)
ld.add_action(yolo_threshold_param)
ld.add_action(yolo_device_param)

ld.add_action(boxmot_yolo_model_param)
ld.add_action(boxmot_input_rgb_topic_param)
ld.add_action(boxmot_input_depth_topic_param)
Expand All @@ -81,7 +46,6 @@ def generate_launch_description():
ld.add_action(boxmot_threshold_param)
ld.add_action(boxmot_device_param)

ld.add_action(yolo_ros_node)
ld.add_action(boxmot_ros_node)

return ld
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
boxmot
# boxmot @ git+https://github.com/KalanaRatnayake/boxmot.git
boxmot

0 comments on commit f073d72

Please sign in to comment.