Skip to content

Commit 7bee498

Browse files
authored
Merge pull request #52 from intel/devel
add launch files to support OA and other components
2 parents 585e472 + 5d5c319 commit 7bee498

File tree

6 files changed

+144
-1
lines changed

6 files changed

+144
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Currently, the inference feature list is supported:
6363
### Topic
6464
#### Subscribed Topic
6565
- Image topic:
66-
```/camera/color/image_raw```([sensor_msgs::msg::Image](https://github.com/ros2/common_interfaces/blob/master/sensor_msgs/msg/Image.msg))
66+
```/openvino_toolkit/image_raw```([sensor_msgs::msg::Image](https://github.com/ros2/common_interfaces/blob/master/sensor_msgs/msg/Image.msg))
6767
#### Published Topic
6868
- Face Detection:
6969
```/ros2_openvino_toolkit/face_detection```([object_msgs:msg:ObjectsInBoxes](https://github.com/intel/ros2_object_msgs/blob/master/msg/ObjectsInBoxes.msg))
@@ -168,6 +168,10 @@ One-step installation scripts are provided for the dependencies' installation. P
168168
```bash
169169
ros2 launch dynamic_vino_sample pipeline_object_oss.launch.py
170170
```
171+
* run object detection sample code input from RealSenseCameraTopic.
172+
```bash
173+
ros2 launch dynamic_vino_sample pipeline_object_oss_topic.launch.py
174+
```
171175
* run object segmentation sample code input from RealSenseCameraTopic.
172176
```bash
173177
ros2 launch dynamic_vino_sample pipeline_segmentation.launch.py

doc/BINARY_VERSION_README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ This project is a ROS2 wrapper for CV API of [OpenVINO™](https://software.inte
164164
```bash
165165
ros2 launch dynamic_vino_sample pipeline_object.launch.py
166166
```
167+
* run object detection sample code input from RealSenseCameraTopic.
168+
```bash
169+
ros2 launch dynamic_vino_sample pipeline_object_topic.launch.py
170+
```
167171
* run object segmentation sample code input from RealSenseCameraTopic.
168172
```bash
169173
ros2 launch dynamic_vino_sample pipeline_segmentation.launch.py
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2018 Open Source Robotics Foundation, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""Launch face detection and rviz."""
16+
17+
import os
18+
19+
from ament_index_python.packages import get_package_share_directory
20+
from launch import LaunchDescription
21+
import launch_ros.actions
22+
23+
24+
def generate_launch_description():
25+
default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', 'pipeline_object_oss_topic.yaml');
26+
default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz');
27+
return LaunchDescription([
28+
# Realsense
29+
launch_ros.actions.Node(
30+
package='realsense_ros2_camera', node_executable='realsense_ros2_camera',output='screen'),
31+
# Openvino Detection
32+
launch_ros.actions.Node(
33+
package='dynamic_vino_sample', node_executable='pipeline_with_params',
34+
arguments=['-config', default_yaml],
35+
remappings=[
36+
('/openvino_toolkit/image_raw', '/camera/color/image_raw'),
37+
('/openvino_toolkit/detected_objects', '/ros2_openvino_toolkit/detected_objects'),
38+
('/openvino_toolkit/images', '/ros2_openvino_toolkit/image_rviz')],
39+
output='screen'),
40+
41+
# Rviz
42+
launch_ros.actions.Node(
43+
package='rviz2', node_executable='rviz2', output='screen',
44+
arguments=['--display-config', default_rviz]),
45+
])
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2018 Open Source Robotics Foundation, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""Launch face detection and rviz."""
16+
17+
import os
18+
19+
from ament_index_python.packages import get_package_share_directory
20+
from launch import LaunchDescription
21+
import launch_ros.actions
22+
23+
24+
def generate_launch_description():
25+
default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', 'pipeline_object_topic.yaml');
26+
default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz');
27+
return LaunchDescription([
28+
#realsense
29+
launch_ros.actions.Node(
30+
package='realsense_ros2_camera', node_executable='realsense_ros2_camera',output='screen'),
31+
32+
#openvino detection
33+
launch_ros.actions.Node(
34+
package='dynamic_vino_sample', node_executable='pipeline_with_params',
35+
arguments=['-config', default_yaml],
36+
remappings=[
37+
('/openvino_toolkit/image_raw', '/camera/color/image_raw'),
38+
('/openvino_toolkit/detected_objects', '/ros2_openvino_toolkit/detected_objects'),
39+
('/openvino_toolkit/images', '/ros2_openvino_toolkit/image_rviz')],
40+
output='screen'),
41+
42+
#rviz
43+
launch_ros.actions.Node(
44+
package='rviz2', node_executable='rviz2', output='screen',
45+
arguments=['--display-config', default_rviz]),
46+
])
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Pipelines:
2+
- name: object
3+
inputs: [RealSenseCameraTopic]
4+
infers:
5+
- name: ObjectDetection
6+
model: /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/ssd/300/caffe/output/ssd300.xml
7+
engine: CPU
8+
label: to/be/set/xxx.labels
9+
batch: 16
10+
outputs: [ImageWindow, RosTopic, RViz]
11+
confidence_threshold: 0.2
12+
connects:
13+
- left: RealSenseCameraTopic
14+
right: [ObjectDetection]
15+
- left: ObjectDetection
16+
right: [ImageWindow]
17+
- left: ObjectDetection
18+
right: [RosTopic]
19+
- left: ObjectDetection
20+
right: [RViz]
21+
22+
OpenvinoCommon:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Pipelines:
2+
- name: object
3+
inputs: [RealSenseCameraTopic]
4+
infers:
5+
- name: ObjectDetection
6+
model: /opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.xml
7+
engine: CPU
8+
label: to/be/set/xxx.labels
9+
batch: 16
10+
outputs: [ImageWindow, RosTopic, RViz]
11+
confidence_threshold: 0.2
12+
connects:
13+
- left: RealSenseCameraTopic
14+
right: [ObjectDetection]
15+
- left: ObjectDetection
16+
right: [ImageWindow]
17+
- left: ObjectDetection
18+
right: [RosTopic]
19+
- left: ObjectDetection
20+
right: [RViz]
21+
22+
OpenvinoCommon:

0 commit comments

Comments
 (0)