标定+USB摄像头启动
This commit is contained in:
12
src/car_image_proc/CMakeLists.txt
Executable file
12
src/car_image_proc/CMakeLists.txt
Executable file
@@ -0,0 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(car_image_proc)
|
||||
|
||||
find_package(ament_cmake REQUIRED)
|
||||
|
||||
# This package currently only provides launch files.
|
||||
install(
|
||||
DIRECTORY launch
|
||||
DESTINATION share/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
ament_package()
|
||||
41
src/car_image_proc/launch/image_proc.launch.py
Normal file
41
src/car_image_proc/launch/image_proc.launch.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
image_topic_arg = DeclareLaunchArgument(
|
||||
'image_topic',
|
||||
default_value='/image',
|
||||
description='Input raw image topic.'
|
||||
)
|
||||
camera_info_topic_arg = DeclareLaunchArgument(
|
||||
'camera_info_topic',
|
||||
default_value='/camera_info',
|
||||
description='Input camera info topic.'
|
||||
)
|
||||
image_rect_topic_arg = DeclareLaunchArgument(
|
||||
'image_rect_topic',
|
||||
default_value='/image_rect',
|
||||
description='Output rectified image topic.'
|
||||
)
|
||||
|
||||
rectify_node = Node(
|
||||
package='image_proc',
|
||||
executable='rectify_node',
|
||||
name='rectify_node',
|
||||
output='screen',
|
||||
remappings=[
|
||||
('image', LaunchConfiguration('image_topic')),
|
||||
('camera_info', LaunchConfiguration('camera_info_topic')),
|
||||
('image_rect', LaunchConfiguration('image_rect_topic')),
|
||||
],
|
||||
)
|
||||
|
||||
return LaunchDescription([
|
||||
image_topic_arg,
|
||||
camera_info_topic_arg,
|
||||
image_rect_topic_arg,
|
||||
rectify_node,
|
||||
])
|
||||
24
src/car_image_proc/package.xml
Normal file
24
src/car_image_proc/package.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
||||
<package format="3">
|
||||
<name>car_image_proc</name>
|
||||
<version>0.0.1</version>
|
||||
<description>Launch wrapper for rectifying the car camera image stream.</description>
|
||||
|
||||
<maintainer email="sunrise@example.com">sunrise</maintainer>
|
||||
<license>BSD-3-Clause</license>
|
||||
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
<exec_depend>image_proc</exec_depend>
|
||||
<exec_depend>launch</exec_depend>
|
||||
<exec_depend>launch_ros</exec_depend>
|
||||
<exec_depend>rclcpp_components</exec_depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
</export>
|
||||
</package>
|
||||
Reference in New Issue
Block a user