Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tracking node that builds #95

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docker/perception/tracking/tracking.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR ${AMENT_WS}/src

# Copy in source code
COPY src/perception/tracking tracking
COPY src/wato_msgs/sample_msgs sample_msgs
COPY src/wato_msgs/perception_msgs/tracking_msgs tracking_msgs

# Scan for rosdeps
RUN apt-get -qq update && rosdep update && \
Expand All @@ -19,6 +19,16 @@ RUN apt-get -qq update && rosdep update && \
################################# Dependencies ################################
FROM ${BASE_IMAGE} as dependencies

# Install pip
RUN apt-get update && apt-get install -y \
python3 \
python3-pip

# Install python packages
COPY src/perception/tracking/requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt
RUN rm requirements.txt

# Install Rosdep requirements
COPY --from=source /tmp/colcon_install_list /tmp/colcon_install_list
RUN apt-fast install -qq -y --no-install-recommends $(cat /tmp/colcon_install_list)
Expand Down
1 change: 1 addition & 0 deletions modules/dev_overrides/docker-compose.perception.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ services:
command: tail -F anything
volumes:
- ${MONO_DIR}/src/perception/tracking:/home/bolty/ament_ws/src/tracking
- ${MONO_DIR}/src/wato_msgs/perception_msgs/tracking_msgs:/home/bolty/ament_ws/src/tracking_msgs
14 changes: 0 additions & 14 deletions src/perception/tracking/CMakeLists.txt

This file was deleted.

7 changes: 7 additions & 0 deletions src/perception/tracking/config/AB3DMOT.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

TRACKER:
COVARIANCE: 'BaselineCovariance' # see covariance.py
MATCH_THRESHOLD: -0.1 # -1 * Minimum IOU threshold
MATCH_ALGORITHM: 'hungarian_match' # see algorithms.py
SCORE_METRIC: 'iou_metric'
USE_ANGULAR_VELOCITY: False
7 changes: 7 additions & 0 deletions src/perception/tracking/config/mahalanobis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

TRACKER:
COVARIANCE: 'BaselineCovariance' # see covariance.py
MATCH_THRESHOLD: 11 # maximum mahalanobis distance
MATCH_ALGORITHM: 'greedy_match' # see algorithms.py
SCORE_METRIC: 'mahalanobis_euclidian_metric'
USE_ANGULAR_VELOCITY: False
19 changes: 19 additions & 0 deletions src/perception/tracking/config/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
obstacle_class_names:
- UNKNOWN
- PEDISTRIAN
- CYCLIST

traffic_sign_class_names:
- LEFT_TURN_SIGN
- RIGHT_TURN_SIGN
- STOP_SIGN
- PED_CROSSING
- DO_NOT_ENTER
- 5MPH_SIGN
- 10MPH_SIGN
- 15MPH_SIGN
- 20MPH_SIGN
- 25MPH_SIGN
- HANDICAP_SIGN
- RAILROAD_CROSSING
- PARKING_SIGN
14 changes: 14 additions & 0 deletions src/perception/tracking/launch/tracking.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
"""Launch Radar object detection system."""
trackingnode = Node(
package='tracking',
executable='tracking_node',
)

return LaunchDescription([
trackingnode
])
7 changes: 5 additions & 2 deletions src/perception/tracking/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
<name>tracking</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="e23zhou@uwaterloo.ca">bolty</maintainer>
<maintainer email="s36gong@uwaterloo.ca">Steven Gong</maintainer>
<license>TODO: License declaration</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>tf_transformations</depend>
<depend>vision_msgs</depend>
<exec_depend>tracking_msgs</exec_depend>

<export>
<build_type>ament_cmake</build_type>
<build_type>ament_python</build_type>
</export>
</package>
9 changes: 9 additions & 0 deletions src/perception/tracking/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
watod build tracking

watod up tracking foxglove data_stream

watod -t tracking
colcon build
ros2 launch tracking tracking.launch.py

watod run data_stream ros2 bag play ./nuscenes/NuScenes-v1.0-mini-scene-0061/NuScenes-v1.0-mini-scene-0061_0.mcap --loop
5 changes: 5 additions & 0 deletions src/perception/tracking/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
transforms3d
numba
filterpy==1.4.5
scipy
easydict
Empty file.
4 changes: 4 additions & 0 deletions src/perception/tracking/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/tracking
[install]
install_scripts=$base/lib/tracking
32 changes: 32 additions & 0 deletions src/perception/tracking/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from setuptools import setup, find_packages
import os
from glob import glob

package_name = 'tracking'

setup(
name=package_name,
version='0.0.0',
# packages=[package_name],
packages=find_packages(),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),
(os.path.join('share', package_name, 'launch', 'include'), glob('launch/include/*.launch.py')),
(os.path.join('share', package_name, 'config'), glob('config/*.yaml')),
],
install_requires=['setuptools'],
zip_safe=True,
maintainer='Steven',
maintainer_email='[email protected]',
description='TODO: Package description',
license='TODO: License declaration',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'tracking_node = tracking.tracker:main'
],
},
)
Empty file.
Empty file.
Loading