修复不同摄像头的物品识别问题

This commit is contained in:
litian.zhuang 2021-12-13 18:10:27 +08:00
parent 7692abeb49
commit 75f9a9aca0
2 changed files with 5 additions and 2 deletions

View File

@ -24,7 +24,9 @@
<param name="config_path" value="$(arg yolo_config_path)" />
<remap from="darknet_ros/detection_image" to="$(arg output_image)" />
<remap from="camera/rgb/image_raw" to="/camera/color/image_raw" if="$(eval arg('camera_type_tel')=='d435')"/>
<remap from="image" to="/camera/rgb/image_raw" unless="$(eval arg('camera_type_tel')=='d435')"/>
<remap from="camera/rgb/image_raw" to="/camera/rgb/image_raw" if="$(eval arg('camera_type_tel')=='astrapro')"/>
<remap from="camera/rgb/image_raw" to="/camera/rgb/image_raw" if="$(eval arg('camera_type_tel')=='astra')"/>
</node>
<!--<node name="republish" type="republish" pkg="image_transport" output="screen" args="compressed in:=/front_camera/image_raw raw out:=/camera/image_raw" /> -->

View File

@ -13,7 +13,8 @@
<node pkg= "tensorflow_object_detector" name="detect_ros" type="detect_ros.py" output="screen">
<remap from="image" to="/camera/color/image_raw" if="$(eval arg('camera_type_tel')=='d435')"/>
<remap from="image" to="/camera/rgb/image_raw" unless="$(eval arg('camera_type_tel')=='d435')"/>
<remap from="image" to="/camera/rgb/image_raw" if="$(eval arg('camera_type_tel')=='astrapro')"/>
<remap from="image" to="/camera/rgb/image_raw" if="$(eval arg('camera_type_tel')=='astra')"/>
</node>