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

Feature/pass through tracker #654

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
23f96c0
Merge pull request #1 from autowarefoundation/tier4/proposal
kenji-miyake Jan 24, 2022
a0fe549
Merge pull request #3 from autowarefoundation/tier4/proposal
kenji-miyake Jan 26, 2022
33549de
ci: add sync-upstream.yaml (#4)
kenji-miyake Jan 29, 2022
355609b
Merge pull request #5 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Feb 8, 2022
b6beeec
Merge pull request #11 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Feb 15, 2022
f371839
Merge pull request #13 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Feb 28, 2022
acf26ea
ci(sync-upstream): update settings (#19)
kenji-miyake Mar 3, 2022
f92e938
Merge pull request #17 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Mar 4, 2022
26c6541
Merge pull request #20 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Mar 18, 2022
8082bea
Merge pull request #27 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Mar 18, 2022
d065ddd
Merge pull request #29 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Apr 4, 2022
4c1d0cb
Merge pull request #30 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Apr 5, 2022
4a3e529
chore: sync files (#629)
awf-autoware-bot[bot] Apr 5, 2022
3dea07d
chore: sync files (#637)
awf-autoware-bot[bot] Apr 6, 2022
f037c18
fix(dummy_diag_publisher): use anon to make unique node name instead …
h-ohta Apr 6, 2022
0c2022a
Merge pull request #32 from tier4/sync-upstream
tier4-autoware-public-bot[bot] Apr 6, 2022
2e2a9ba
add pass through tracker
purewater0901 Apr 7, 2022
2b25956
add velocity calculation
purewater0901 Apr 7, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Upload coverage to CodeCov
if: ${{ steps.test.outputs.coverage-report-files != '' }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: Upload coverage to CodeCov
if: ${{ steps.test.outputs.coverage-report-files != '' }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: false
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/sync-upstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: sync-upstream

on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

jobs:
sync-upstream:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Run sync-branches
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
with:
token: ${{ steps.generate-token.outputs.token }}
base-branch: tier4/main
sync-pr-branch: sync-upstream
sync-target-repository: https://github.com/autowarefoundation/autoware.universe.git
sync-target-branch: main
pr-title: "chore: sync upstream"
auto-merge-method: merge
2 changes: 2 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for all rules.
default: true
MD013: false
MD024:
siblings_only: true
MD033: false
MD041: false
MD046: false
MD049: false
18 changes: 18 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
printWidth: 100
tabWidth: 2
overrides:
- files: package.xml
options:
printWidth: 1000
xmlSelfClosingSpace: false
xmlWhitespaceSensitivity: ignore

- files: "*.launch.xml"
options:
printWidth: 200
xmlSelfClosingSpace: false
xmlWhitespaceSensitivity: ignore

- files: "*.xacro"
options:
printWidth: 200
xmlSelfClosingSpace: false
xmlWhitespaceSensitivity: ignore
1 change: 1 addition & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ filter=-whitespace/parens # we allow closing parenthesis to be on the ne
filter=-whitespace/semicolon # we allow the developer to decide about whitespace after a semicolon
filter=-build/header_guard # we automatically fix the names of header guards using pre-commit
filter=-build/include_order # we use the custom include order
filter=-build/include_subdir # we allow the style of "foo.hpp"
2 changes: 1 addition & 1 deletion common/goal_distance_calculator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">
<name>goal_distance_calculator</name>
<version>0.0.0</version>
<description>The goal_distance_calculator package </description>
<description>The goal_distance_calculator package</description>
<maintainer email="ttatcoder@outlook.jp">Taiki Tanaka</maintainer>
<license>Apache License 2.0</license>

Expand Down
2 changes: 0 additions & 2 deletions common/path_distance_calculator/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?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>path_distance_calculator</name>
<version>0.0.0</version>
<description>The path_distance_calculator package</description>
Expand All @@ -20,5 +19,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>

</package>
1 change: 0 additions & 1 deletion common/polar_grid/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@
<build_type>ament_cmake</build_type>
<rviz plugin="${prefix}/plugins/plugin_description.xml"/>
</export>

</package>
2 changes: 0 additions & 2 deletions common/tier4_api_utils/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?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>tier4_api_utils</name>
<version>0.0.0</version>
<description>The tier4_api_utils package</description>
Expand All @@ -24,5 +23,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>

</package>
2 changes: 0 additions & 2 deletions common/tier4_datetime_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<package format="2">

<name>tier4_datetime_rviz_plugin</name>
<version>0.0.0</version>
<description>The tier4_datetime_rviz_plugin package</description>
Expand All @@ -22,5 +21,4 @@
<build_type>ament_cmake</build_type>
<rviz plugin="${prefix}/plugins/plugin_description.xml"/>
</export>

</package>
2 changes: 0 additions & 2 deletions common/tier4_localization_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<package format="3">

<name>tier4_localization_rviz_plugin</name>
<version>0.1.0</version>
<description>The tier4_localization_rviz_plugin package</description>
Expand All @@ -25,5 +24,4 @@
<build_type>ament_cmake</build_type>
<rviz plugin="${prefix}/plugins/plugin_description.xml"/>
</export>

</package>
2 changes: 0 additions & 2 deletions common/tier4_planning_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<package format="3">

<name>tier4_planning_rviz_plugin</name>
<version>0.1.0</version>
<description>The tier4_planning_rviz_plugin package</description>
Expand Down Expand Up @@ -28,5 +27,4 @@
<build_type>ament_cmake</build_type>
<rviz plugin="${prefix}/plugins/plugin_description.xml"/>
</export>

</package>
2 changes: 0 additions & 2 deletions common/tier4_simulated_clock_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<package format="2">

<name>tier4_simulated_clock_rviz_plugin</name>
<version>0.0.1</version>
<description>Rviz plugin to publish and control the /clock topic</description>
Expand All @@ -23,5 +22,4 @@
<build_type>ament_cmake</build_type>
<rviz plugin="${prefix}/plugins/plugin_description.xml"/>
</export>

</package>
2 changes: 0 additions & 2 deletions common/tier4_state_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<package format="2">

<name>tier4_state_rviz_plugin</name>
<version>0.0.0</version>
<description>The autoware state rviz plugin package</description>
Expand All @@ -26,5 +25,4 @@
<build_type>ament_cmake</build_type>
<rviz plugin="${prefix}/plugins/plugin_description.xml"/>
</export>

</package>
1 change: 0 additions & 1 deletion control/shift_decider/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>

</package>
1 change: 0 additions & 1 deletion launch/tier4_vehicle_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<maintainer email="yukihiro.saito@tier4.jp">Yukihiro Saito</maintainer>
<license>Apache License 2.0</license>


<buildtool_depend>ament_cmake_auto</buildtool_depend>

<exec_depend>robot_state_publisher</exec_depend>
Expand Down
1 change: 0 additions & 1 deletion localization/ekf_localizer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>

</package>
6 changes: 0 additions & 6 deletions map/util/lanelet2_map_preprocessor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,21 @@
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="mitsudome-r@todo.todo">mitsudome-r</maintainer>


<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>Apache License 2.0</license>


<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/lanelet2_map_preprocessor</url> -->


<!-- Author tags are optional, multiple are allowed, one per tag -->
<!-- Authors do not have to be maintainers, but could be -->
<!-- Example: -->
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->


<!-- The *depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
Expand Down Expand Up @@ -59,10 +55,8 @@
<exec_depend>pcl_ros</exec_depend>
<exec_depend>roscpp</exec_depend>


<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->

</export>
</package>
1 change: 1 addition & 0 deletions perception/multi_object_tracker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ set(MULTI_OBJECT_TRACKER_SRC
src/tracker/model/pedestrian_tracker.cpp
src/tracker/model/pedestrian_and_bicycle_tracker.cpp
src/tracker/model/unknown_tracker.cpp
src/tracker/model/pass_through_tracker.cpp
src/data_association/data_association.cpp
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class MultiObjectTracker : public rclcpp::Node
tf2_ros::Buffer tf_buffer_;
tf2_ros::TransformListener tf_listener_;

bool use_pass_through_tracker_;

void onMeasurement(
const autoware_auto_perception_msgs::msg::DetectedObjects::ConstSharedPtr input_objects_msg);
void onTimer();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2022 Tier IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
// Author: v1.0 Yutaka Shimizu
//

#ifndef MULTI_OBJECT_TRACKER__TRACKER__MODEL__PASS_THROUGH_TRACKER_HPP_
#define MULTI_OBJECT_TRACKER__TRACKER__MODEL__PASS_THROUGH_TRACKER_HPP_

#include "tracker_base.hpp"

#include <kalman_filter/kalman_filter.hpp>

class PassThroughTracker : public Tracker
{
private:
autoware_auto_perception_msgs::msg::DetectedObject object_;
autoware_auto_perception_msgs::msg::DetectedObject prev_observed_object_;
rclcpp::Logger logger_;
rclcpp::Time last_update_time_;

public:
PassThroughTracker(
const rclcpp::Time & time, const autoware_auto_perception_msgs::msg::DetectedObject & object);
bool predict(const rclcpp::Time & time) override;
bool measure(
const autoware_auto_perception_msgs::msg::DetectedObject & object,
const rclcpp::Time & time) override;
bool getTrackedObject(
const rclcpp::Time & time,
autoware_auto_perception_msgs::msg::TrackedObject & object) const override;
virtual ~PassThroughTracker() {}
};

#endif // MULTI_OBJECT_TRACKER__TRACKER__MODEL__PASS_THROUGH_TRACKER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "model/big_vehicle_tracker.hpp"
#include "model/multiple_vehicle_tracker.hpp"
#include "model/normal_vehicle_tracker.hpp"
#include "model/pass_through_tracker.hpp"
#include "model/pedestrian_and_bicycle_tracker.hpp"
#include "model/pedestrian_tracker.hpp"
#include "model/tracker_base.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
<arg name="output" default="objects"/>
<arg name="world_frame_id" default="map"/>
<arg name="publish_rate" default="10.0"/>
<arg name="use_pass_through_tracker" default="false"/>
<arg name="data_association_matrix_path" default="$(find-pkg-share multi_object_tracker)/config/data_association_matrix.param.yaml" />

<node pkg="multi_object_tracker" exec="multi_object_tracker" name="multi_object_tracker" output="screen">
<remap from="input" to="$(var input)"/>
<remap from="output" to="$(var output)"/>
<param name="world_frame_id" value="$(var world_frame_id)" />
<param name="publish_rate" value="$(var publish_rate)" />
<param name="use_pass_through_tracker" value="$(var use_pass_through_tracker)" />
<param from="$(var data_association_matrix_path)" />
</node>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ MultiObjectTracker::MultiObjectTracker(const rclcpp::NodeOptions & node_options)
double publish_rate = declare_parameter<double>("publish_rate", 30.0);
world_frame_id_ = declare_parameter<std::string>("world_frame_id", "world");
bool enable_delay_compensation{declare_parameter("enable_delay_compensation", false)};
use_pass_through_tracker_ = declare_parameter("use_pass_through_tracker", false);

auto cti = std::make_shared<tf2_ros::CreateTimerROS>(
this->get_node_base_interface(), this->get_node_timers_interface());
Expand Down Expand Up @@ -264,6 +265,11 @@ std::shared_ptr<Tracker> MultiObjectTracker::createNewTracker(
const autoware_auto_perception_msgs::msg::DetectedObject & object,
const rclcpp::Time & time) const
{
if (use_pass_through_tracker_) {
std::cerr << "use pass through tracker" << std::endl;
return std::make_shared<PassThroughTracker>(time, object);
}

const std::uint8_t label = utils::getHighestProbLabel(object.classification);
if (label == Label::CAR || label == Label::TRUCK || label == Label::BUS) {
return std::make_shared<MultipleVehicleTracker>(time, object);
Expand Down
Loading