readme mini-update
This commit is contained in:
24
tracking_re_id/calibration/left.yaml
Normal file
24
tracking_re_id/calibration/left.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
# Left camera calibration file.
|
||||
# Replace this with the output from your stereo calibration tool (e.g. camera_calibration ROS package).
|
||||
# The file must follow the ROS camera_info YAML format consumed by camera_info_url.
|
||||
|
||||
image_width: 1440
|
||||
image_height: 1080
|
||||
camera_name: left
|
||||
camera_matrix:
|
||||
rows: 3
|
||||
cols: 3
|
||||
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
|
||||
distortion_model: plumb_bob
|
||||
distortion_coefficients:
|
||||
rows: 1
|
||||
cols: 5
|
||||
data: [0, 0, 0, 0, 0]
|
||||
rectification_matrix:
|
||||
rows: 3
|
||||
cols: 3
|
||||
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
|
||||
projection_matrix:
|
||||
rows: 3
|
||||
cols: 4
|
||||
data: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0]
|
||||
24
tracking_re_id/calibration/right.yaml
Normal file
24
tracking_re_id/calibration/right.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
# Right camera calibration file.
|
||||
# Replace this with the output from your stereo calibration tool (e.g. camera_calibration ROS package).
|
||||
# The file must follow the ROS camera_info YAML format consumed by camera_info_url.
|
||||
|
||||
image_width: 1440
|
||||
image_height: 1080
|
||||
camera_name: right
|
||||
camera_matrix:
|
||||
rows: 3
|
||||
cols: 3
|
||||
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
|
||||
distortion_model: plumb_bob
|
||||
distortion_coefficients:
|
||||
rows: 1
|
||||
cols: 5
|
||||
data: [0, 0, 0, 0, 0]
|
||||
rectification_matrix:
|
||||
rows: 3
|
||||
cols: 3
|
||||
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
|
||||
projection_matrix:
|
||||
rows: 3
|
||||
cols: 4
|
||||
data: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0]
|
||||
82
tracking_re_id/launch/start_cameras_only.launch.py
Normal file
82
tracking_re_id/launch/start_cameras_only.launch.py
Normal file
@@ -0,0 +1,82 @@
|
||||
"""Launch camera drivers only (no rectification or stereo processing)."""
|
||||
|
||||
import os
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
from launch import LaunchDescription
|
||||
from launch_ros.actions import ComposableNodeContainer, Node
|
||||
from launch_ros.descriptions import ComposableNode
|
||||
|
||||
LEFT_CAMERA_NAME = 'left'
|
||||
RIGHT_CAMERA_NAME = 'right'
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
pkg_share = get_package_share_directory('tracking_re_id')
|
||||
|
||||
config_path = os.path.join(
|
||||
get_package_share_directory('spinnaker_camera_driver'),
|
||||
'config',
|
||||
'blackfly_s.yaml'
|
||||
)
|
||||
|
||||
left_cal = 'file://' + os.path.join(pkg_share, 'calibration', 'left.yaml')
|
||||
right_cal = 'file://' + os.path.join(pkg_share, 'calibration', 'right.yaml')
|
||||
|
||||
# ── Camera Drivers (component_container_mt) ─────────────────────────
|
||||
#
|
||||
# Both cameras share a single process because the FLIR Spinnaker SDK
|
||||
# requires USB3 cameras to negotiate bandwidth within one process.
|
||||
#
|
||||
# Topics published (per camera):
|
||||
# /stereo/{left,right}/image_raw (sensor_msgs/Image)
|
||||
# /stereo/{left,right}/camera_info (sensor_msgs/CameraInfo)
|
||||
camera_container = ComposableNodeContainer(
|
||||
name='camera_container',
|
||||
namespace='',
|
||||
package='rclcpp_components',
|
||||
executable='component_container_mt',
|
||||
composable_node_descriptions=[
|
||||
ComposableNode(
|
||||
package='spinnaker_camera_driver',
|
||||
plugin='spinnaker_camera_driver::CameraDriver',
|
||||
name=LEFT_CAMERA_NAME,
|
||||
namespace='stereo',
|
||||
parameters=[{
|
||||
'parameter_file': config_path,
|
||||
'serial_number': '25282106',
|
||||
'camera_info_url': left_cal,
|
||||
}],
|
||||
extra_arguments=[{'use_intra_process_comms': True}],
|
||||
),
|
||||
ComposableNode(
|
||||
package='spinnaker_camera_driver',
|
||||
plugin='spinnaker_camera_driver::CameraDriver',
|
||||
name=RIGHT_CAMERA_NAME,
|
||||
namespace='stereo',
|
||||
parameters=[{
|
||||
'parameter_file': config_path,
|
||||
'serial_number': '25235293',
|
||||
'camera_info_url': right_cal,
|
||||
}],
|
||||
extra_arguments=[{'use_intra_process_comms': True}],
|
||||
),
|
||||
],
|
||||
output='screen',
|
||||
)
|
||||
|
||||
# ── Static TF: world -> left ─────────────────────────────────────────
|
||||
tf_publisher = Node(
|
||||
package='tf2_ros',
|
||||
executable='static_transform_publisher',
|
||||
arguments=[
|
||||
'--x', '0', '--y', '0', '--z', '0',
|
||||
'--yaw', '0', '--pitch', '0', '--roll', '0',
|
||||
'--frame-id', 'world',
|
||||
'--child-frame-id', 'left',
|
||||
],
|
||||
)
|
||||
|
||||
return LaunchDescription([
|
||||
camera_container,
|
||||
tf_publisher,
|
||||
])
|
||||
@@ -14,6 +14,7 @@ setup(
|
||||
('share/' + package_name, ['package.xml']),
|
||||
(os.path.join('share', package_name, 'launch'), glob('launch/*.py')),
|
||||
(os.path.join('share', package_name, 'weights'), glob('weights/*.pth')),
|
||||
(os.path.join('share', package_name, 'calibration'), glob('calibration/*.yaml')),
|
||||
],
|
||||
install_requires=['setuptools'],
|
||||
zip_safe=True,
|
||||
|
||||
Reference in New Issue
Block a user