readme mini-update
This commit is contained in:
13
readme.md
13
readme.md
@@ -2,9 +2,13 @@
|
|||||||
Repository for robust, adaptive 3D person tracking and reidentification in busy areas
|
Repository for robust, adaptive 3D person tracking and reidentification in busy areas
|
||||||
|
|
||||||
## Environment Setup
|
## Environment Setup
|
||||||
**Your environment MUST have MMPOSE properly installed.** Follow the instructions below to set it up
|
**Next, your environment MUST have MMPOSE and the tracking_re_id ROS2 package properly installed** Follow the instructions below to set it up
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# wherever you want your workspace root to be (anywhere upstream of tracking_re_id):
|
||||||
|
colcon build --symlink-install
|
||||||
|
source install/setup.bash
|
||||||
|
|
||||||
# 3.10 is the latest supported by MMPOSE
|
# 3.10 is the latest supported by MMPOSE
|
||||||
conda create -n mmpose python=3.10 -y
|
conda create -n mmpose python=3.10 -y
|
||||||
conda activate mmpose
|
conda activate mmpose
|
||||||
@@ -27,3 +31,10 @@ pip install "opencv-python==4.11.0.86"
|
|||||||
```
|
```
|
||||||
|
|
||||||
**This installation is referenced in each launchfile by finding the location of your conda base environment, then finding an environment named "mmpose" - if you use a different name, you must change each launch file.**
|
**This installation is referenced in each launchfile by finding the location of your conda base environment, then finding an environment named "mmpose" - if you use a different name, you must change each launch file.**
|
||||||
|
|
||||||
|
## Camera Driver / Calibration
|
||||||
|
Many nodes in the ```tracking_re_id``` package rely on the ```/stereo/left/camera_info``` and ```/stereo/right/camera_info``` topics publishing calibration data for the camera. This requires calibration to be performed, replacing ```left.yaml``` and ```right.yaml``` in ```tracking_re_id/calibration```.
|
||||||
|
|
||||||
|
Visit https://docs.ros.org/en/jazzy/p/camera_calibration/doc/tutorial_stereo.html for instructions on running the calibration. The left and right yaml files always had ```camera_name=narrow_stereo/left``` and ```camera_name=narrow_stereo/right``` which have to be changed to ```stereo/left``` and ```stereo/right```, respectively.
|
||||||
|
|
||||||
|
To run the camera driver after calibration has been conducted, simply execute ```ros2 launch tracking_re_id start_cameras_only.launch.py```. Running ```colcon build``` again is **NOT** required, as you should have run it with ```--symlink-install``` previously.
|
||||||
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]
|
||||||
@@ -11,12 +11,17 @@ RIGHT_CAMERA_NAME = 'right'
|
|||||||
|
|
||||||
|
|
||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
|
pkg_share = get_package_share_directory('tracking_re_id')
|
||||||
|
|
||||||
config_path = os.path.join(
|
config_path = os.path.join(
|
||||||
get_package_share_directory('spinnaker_camera_driver'),
|
get_package_share_directory('spinnaker_camera_driver'),
|
||||||
'config',
|
'config',
|
||||||
'blackfly_s.yaml'
|
'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) ─────────────────────────
|
# ── Camera Drivers (component_container_mt) ─────────────────────────
|
||||||
#
|
#
|
||||||
# Both cameras share a single process because the FLIR Spinnaker SDK
|
# Both cameras share a single process because the FLIR Spinnaker SDK
|
||||||
@@ -39,7 +44,7 @@ def generate_launch_description():
|
|||||||
parameters=[{
|
parameters=[{
|
||||||
'parameter_file': config_path,
|
'parameter_file': config_path,
|
||||||
'serial_number': '25282106',
|
'serial_number': '25282106',
|
||||||
'camera_info_url': 'file:///home/sentry/camera_ws/stereoCal/left.yaml',
|
'camera_info_url': left_cal,
|
||||||
}],
|
}],
|
||||||
extra_arguments=[{'use_intra_process_comms': True}],
|
extra_arguments=[{'use_intra_process_comms': True}],
|
||||||
),
|
),
|
||||||
@@ -51,7 +56,7 @@ def generate_launch_description():
|
|||||||
parameters=[{
|
parameters=[{
|
||||||
'parameter_file': config_path,
|
'parameter_file': config_path,
|
||||||
'serial_number': '25235293',
|
'serial_number': '25235293',
|
||||||
'camera_info_url': 'file:///home/sentry/camera_ws/stereoCal/right.yaml',
|
'camera_info_url': right_cal,
|
||||||
}],
|
}],
|
||||||
extra_arguments=[{'use_intra_process_comms': True}],
|
extra_arguments=[{'use_intra_process_comms': True}],
|
||||||
),
|
),
|
||||||
@@ -14,6 +14,7 @@ setup(
|
|||||||
('share/' + package_name, ['package.xml']),
|
('share/' + package_name, ['package.xml']),
|
||||||
(os.path.join('share', package_name, 'launch'), glob('launch/*.py')),
|
(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, 'weights'), glob('weights/*.pth')),
|
||||||
|
(os.path.join('share', package_name, 'calibration'), glob('calibration/*.yaml')),
|
||||||
],
|
],
|
||||||
install_requires=['setuptools'],
|
install_requires=['setuptools'],
|
||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
|
|||||||
Reference in New Issue
Block a user