Skip to content

Commit

Permalink
Update launch file for 3 cameras (#74)
Browse files Browse the repository at this point in the history
* Update launch file for 3 cameras

* Rename to eve

* Fix Linting
  • Loading branch information
Gongsta authored Feb 20, 2024
1 parent de3ec36 commit 21adfd7
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 34 deletions.
2 changes: 1 addition & 1 deletion modules/docker-compose.perception.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- driver: nvidia
count: 1
capabilities: [ gpu ]
command: /bin/bash -c "ros2 launch camera_object_detection nuscenes_launch.py"
command: /bin/bash -c "ros2 launch camera_object_detection eve_launch.py"
volumes:
- /mnt/wato-drive2/perception_models/yolov8s.pt:/perception_models/yolov8s.pt

Expand Down
23 changes: 23 additions & 0 deletions src/perception/camera_object_detection/config/eve_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
left_camera_object_detection_node:
ros__parameters:
camera_topic: /camera/left/image_color
publish_vis_topic: /camera/left/annotated_img
publish_detection_topic: /camera/left/detections
model_path: /perception_models/yolov8s.pt
image_size: 480

center_camera_object_detection_node:
ros__parameters:
camera_topic: /camera/center/image_color
publish_vis_topic: /camera/center/annotated_img
publish_detection_topic: /camera/center/detections
model_path: /perception_models/yolov8s.pt
image_size: 480

right_camera_object_detection_node:
ros__parameters:
camera_topic: /camera/right/image_color
publish_vis_topic: /camera/right/annotated_img
publish_detection_topic: /camera/right/detections
model_path: /perception_models/yolov8s.pt
image_size: 480
7 changes: 0 additions & 7 deletions src/perception/camera_object_detection/config/sim_config.yaml

This file was deleted.

42 changes: 42 additions & 0 deletions src/perception/camera_object_detection/launch/eve_launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os


def generate_launch_description():
ld = LaunchDescription()
config = os.path.join(
get_package_share_directory('camera_object_detection'),
'config',
'eve_config.yaml'
)

# nodes
left_camera_object_detection_node = Node(
package='camera_object_detection',
executable='camera_object_detection_node',
name='left_camera_object_detection_node',
parameters=[config]
)

center_camera_object_detection_node = Node(
package='camera_object_detection',
executable='camera_object_detection_node',
name='center_camera_object_detection_node',
parameters=[config]
)

right_camera_object_detection_node = Node(
package='camera_object_detection',
executable='camera_object_detection_node',
name='right_camera_object_detection_node',
parameters=[config]
)

# finalize
ld.add_action(left_camera_object_detection_node)
ld.add_action(center_camera_object_detection_node)
ld.add_action(right_camera_object_detection_node)

return ld
26 changes: 0 additions & 26 deletions src/perception/camera_object_detection/launch/sim_launch.py

This file was deleted.

0 comments on commit 21adfd7

Please sign in to comment.