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

feat(multi_object_tracker): multi object input #6820

Merged
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
5412a55
refactor: frequently used types, namespace
technolojin Apr 11, 2024
4176cec
test: multiple inputs
technolojin Apr 11, 2024
96be0cc
feat: check latest measurement time
technolojin Apr 11, 2024
fd086dc
feat: define input manager class
technolojin Apr 12, 2024
1462eef
feat: interval measures
technolojin Apr 12, 2024
7757212
feat: store and sort inputs PoC
technolojin Apr 12, 2024
2a443e7
chore: rename classes
technolojin Apr 12, 2024
866b656
feat: object collector
technolojin Apr 12, 2024
4b71b57
impl input manager, no subscribe
technolojin Apr 12, 2024
a9fa209
fix: subscribe and trigger callback
technolojin Apr 15, 2024
cf2874d
fix: subscriber and callbacks are working
technolojin Apr 15, 2024
246cb4a
fix: callback object is fixed, tracker is working
technolojin Apr 15, 2024
9ebaf6d
fix: get object time argument revise
technolojin Apr 15, 2024
c496a25
feat: back to periodic publish, analyze input latency and timings
technolojin Apr 15, 2024
969483c
fix: enable timing debugger
technolojin Apr 15, 2024
ceaacc3
fix: separate object interval function
technolojin Apr 15, 2024
c556460
feat: prepare message triggered process
technolojin Apr 15, 2024
4afab3f
feat: trigger tracker by main message arrive
technolojin Apr 16, 2024
23a9df4
chore: clean-up, set namespace
technolojin Apr 16, 2024
787d48b
feat: object lists with detector index
technolojin Apr 16, 2024
b4993c2
feat: define input channel struct
technolojin Apr 16, 2024
e495efb
fix: define type for object list
technolojin Apr 17, 2024
4955207
feat: add channel wise existence probability
technolojin Apr 17, 2024
46c16c7
fix: relocate debugger
technolojin Apr 18, 2024
99ad038
fix: total existence logic change
technolojin Apr 18, 2024
1a761f9
feat: publishing object debug info, need to fix marker id
technolojin Apr 18, 2024
15455cd
feat: indexing marker step 1
technolojin Apr 18, 2024
212752c
fix: uuid management
technolojin Apr 19, 2024
b6f59a9
feat: association line fix
technolojin Apr 19, 2024
104dac4
feat: print channel names
technolojin Apr 19, 2024
8d4408b
feat: association lines are color-coded
technolojin Apr 19, 2024
30aed23
fix: association debug marker bugfix
technolojin Apr 22, 2024
78014b9
style(pre-commit): autofix
pre-commit-ci[bot] Apr 22, 2024
d036f32
feat: add option for debug marker
technolojin Apr 22, 2024
8d6009d
feat: skip time statistics update in case of outlier
technolojin Apr 23, 2024
90d287c
feat: auto-tune latency band
technolojin Apr 24, 2024
ca91b5b
feat: pre-defined channels, select on launcher
technolojin Apr 26, 2024
5c62105
feat: add input channels
technolojin Apr 26, 2024
0d4b683
fix: remove marker idx map
technolojin Apr 26, 2024
9fbf563
fix: to do not miss the latest message of the target stream
technolojin Apr 26, 2024
736411d
fix: remove priority, separate timing optimization
technolojin Apr 26, 2024
5a0757e
fix: time interval bug fix
technolojin Apr 26, 2024
5437a9e
chore: refactoring timing state update
technolojin Apr 26, 2024
6d317e5
fix: set parameters optionally
technolojin May 7, 2024
adc8415
feat: revise object time range logic
technolojin May 7, 2024
ca5c4ac
fix: launcher to set input channels
technolojin May 8, 2024
b2ca6a1
fix: exempt spell check 'pointpainting'
technolojin May 10, 2024
df0cd9f
feat: remove expected interval
technolojin May 13, 2024
0c9c2d8
feat: implement spawn switch
technolojin May 13, 2024
2045957
fix: remove debug messages
technolojin May 13, 2024
eb09e03
chore: update readme
technolojin May 13, 2024
dab7cdc
fix: change tentative object topic
technolojin May 13, 2024
7a0553e
Revert "fix: remove debug messages"
technolojin May 13, 2024
094110f
fix: reset times when jumps to past
technolojin May 13, 2024
c1a85b8
fix: check if interval is negative
technolojin May 14, 2024
c12109a
fix: missing config, default value
technolojin May 14, 2024
c589c3a
fix: remove debug messages
technolojin May 14, 2024
48a8861
fix: change no-object message level
technolojin May 14, 2024
f873ab8
Update perception/multi_object_tracker/include/multi_object_tracker/d…
technolojin May 16, 2024
1ba2c79
chore: Update copyright to uppercase
technolojin May 16, 2024
9edd2e0
chore: fix readme links to config files
technolojin May 16, 2024
cf6cf3c
chore: move and rename uuid functions
technolojin May 17, 2024
d5efe10
chore: fix debug topic to use node name
technolojin May 17, 2024
4445c45
chore: express meaning of threshold
technolojin May 17, 2024
f218f84
feat: revise decay rate, update function
technolojin May 23, 2024
b623993
fix: define constants with explanation
technolojin May 23, 2024
13adc73
style(pre-commit): autofix
pre-commit-ci[bot] May 23, 2024
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
Prev Previous commit
Next Next commit
fix: total existence logic change
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
technolojin committed May 14, 2024
commit 99ad038dec2b1c1196996d6a6e92db8bc3607328
Original file line number Diff line number Diff line change
@@ -57,6 +57,8 @@ class TrackerProcessor
const rclcpp::Time & time,
autoware_auto_perception_msgs::msg::TrackedObjects & tentative_objects) const;

void getExistenceProbabilities(std::vector<std::vector<float>> & existence_vectors) const;

private:
std::map<std::uint8_t, std::string> tracker_map_;
std::list<std::shared_ptr<Tracker>> list_tracker_;
Original file line number Diff line number Diff line change
@@ -58,6 +58,11 @@ class Tracker

void initializeExistenceProbabilities(
const uint & channel_index, const float & existence_probability);
bool getExistenceProbabilityVector(std::vector<float> & existence_vector) const
{
existence_vector = existence_probabilities_;
return existence_vector.size() > 0;
}
bool updateWithMeasurement(
const autoware_auto_perception_msgs::msg::DetectedObject & object,
const rclcpp::Time & measurement_time, const geometry_msgs::msg::Transform & self_transform,
6 changes: 2 additions & 4 deletions perception/multi_object_tracker/src/debugger/debugger.cpp
Original file line number Diff line number Diff line change
@@ -11,8 +11,6 @@
// 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.
//
//

#include "multi_object_tracker/debugger/debugger.hpp"

@@ -74,7 +72,7 @@ void TrackerDebugger::setupDiagnostics()
diagnostic_updater_.setPeriod(0.1);
}

// object publishing functions
// Object publishing functions

void TrackerDebugger::publishTentativeObjects(
const autoware_auto_perception_msgs::msg::TrackedObjects & tentative_objects) const
@@ -84,7 +82,7 @@ void TrackerDebugger::publishTentativeObjects(
}
}

// time measurement functions
// Time measurement functions

void TrackerDebugger::checkDelay(diagnostic_updater::DiagnosticStatusWrapper & stat)
{
27 changes: 10 additions & 17 deletions perception/multi_object_tracker/src/tracker/model/tracker_base.cpp
Original file line number Diff line number Diff line change
@@ -58,8 +58,9 @@ bool Tracker::updateWithMeasurement(
no_measurement_count_ = 0;
++total_measurement_count_;

double const delta_time = (measurement_time - last_update_with_measurement_time_).seconds();
double const decay_rate = 5.0 / 10.0;
// existence probability on each channel
const double delta_time = (measurement_time - last_update_with_measurement_time_).seconds();
const double decay_rate = 5.0 / 10.0;
existence_probabilities_[channel_index] = existence_probability_from_object;
for (size_t i = 0; i < existence_probabilities_.size(); ++i) {
if (i == channel_index) {
@@ -68,11 +69,9 @@ bool Tracker::updateWithMeasurement(
existence_probabilities_[i] *= std::exp(-decay_rate * delta_time);
}

// regularization
total_existence_probability_ =
std::accumulate(existence_probabilities_.begin(), existence_probabilities_.end(), 0.0f);
total_existence_probability_ = std::max(total_existence_probability_, 0.0f);
total_existence_probability_ = std::min(total_existence_probability_, 1.0f);
// total existence probability - object is detected
total_existence_probability_ +=
(1 - total_existence_probability_) * existence_probability_from_object;
}

last_update_with_measurement_time_ = measurement_time;
@@ -86,22 +85,16 @@ bool Tracker::updateWithMeasurement(
bool Tracker::updateWithoutMeasurement(const rclcpp::Time & now)
{
// Update existence probability
++no_measurement_count_;
++total_no_measurement_count_;
{
++no_measurement_count_;
++total_no_measurement_count_;

// decay
// decay existence probability
double const delta_time = (now - last_update_with_measurement_time_).seconds();
double const decay_rate = 5.0 / 10.0;
for (size_t i = 0; i < existence_probabilities_.size(); ++i) {
existence_probabilities_[i] *= std::exp(-decay_rate * delta_time);
}

// regularization
total_existence_probability_ =
std::accumulate(existence_probabilities_.begin(), existence_probabilities_.end(), 0.0f);
total_existence_probability_ = std::max(total_existence_probability_, 0.0f);
total_existence_probability_ = std::min(total_existence_probability_, 1.0f);
total_existence_probability_ *= std::exp(-decay_rate * delta_time);
}

return true;