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

fix(multi_object_tracker): bicycle motion model - set minimum wheel-to-center length #6337

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ BicycleTracker::BicycleTracker(
ekf_.init(X, P);

// Set lf, lr
lf_ = bounding_box_.length * 0.3; // 30% front from the center
lr_ = bounding_box_.length * 0.3; // 30% rear from the center
lf_ = std::max(bounding_box_.length * 0.3, 0.3); // 30% front from the center, minimum of 0.3m
lr_ = std::max(bounding_box_.length * 0.3, 0.3); // 30% rear from the center, minimum of 0.3m
}

bool BicycleTracker::predict(const rclcpp::Time & time)
Expand Down Expand Up @@ -425,8 +425,8 @@ bool BicycleTracker::measureWithShape(
bbox_object.shape.dimensions.x, bbox_object.shape.dimensions.y, bbox_object.shape.dimensions.z};

// update lf, lr
lf_ = bounding_box_.length * 0.3; // 30% front from the center
lr_ = bounding_box_.length * 0.3; // 30% rear from the center
lf_ = std::max(bounding_box_.length * 0.3, 0.3); // 30% front from the center, minimum of 0.3m
lr_ = std::max(bounding_box_.length * 0.3, 0.3); // 30% rear from the center, minimum of 0.3m

return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ BigVehicleTracker::BigVehicleTracker(
setNearestCornerOrSurfaceIndex(self_transform); // this index is used in next measure step

// Set lf, lr
lf_ = bounding_box_.length * 0.3; // 30% front from the center
lr_ = bounding_box_.length * 0.25; // 25% rear from the center
lf_ = std::max(bounding_box_.length * 0.3, 1.5); // 30% front from the center, minimum of 1.5m
lr_ = std::max(bounding_box_.length * 0.25, 1.5); // 25% rear from the center, minimum of 1.5m
}

bool BigVehicleTracker::predict(const rclcpp::Time & time)
Expand Down Expand Up @@ -457,9 +457,8 @@ bool BigVehicleTracker::measureWithShape(
bbox_object.shape.dimensions.x, bbox_object.shape.dimensions.y, bbox_object.shape.dimensions.z};

// update lf, lr
lf_ = bounding_box_.length * 0.3; // 30% front from the center
lr_ = bounding_box_.length * 0.25; // 25% rear from the center

lf_ = std::max(bounding_box_.length * 0.3, 1.5); // 30% front from the center, minimum of 1.5m
lr_ = std::max(bounding_box_.length * 0.25, 1.5); // 25% rear from the center, minimum of 1.5m
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ NormalVehicleTracker::NormalVehicleTracker(
setNearestCornerOrSurfaceIndex(self_transform); // this index is used in next measure step

// Set lf, lr
lf_ = bounding_box_.length * 0.3; // 30% front from the center
lr_ = bounding_box_.length * 0.25; // 25% rear from the center
lf_ = std::max(bounding_box_.length * 0.3, 1.0); // 30% front from the center, minimum of 1.0m
lr_ = std::max(bounding_box_.length * 0.25, 1.0); // 25% rear from the center, minimum of 1.0m
}

bool NormalVehicleTracker::predict(const rclcpp::Time & time)
Expand Down Expand Up @@ -457,8 +457,8 @@ bool NormalVehicleTracker::measureWithShape(
bbox_object.shape.dimensions.x, bbox_object.shape.dimensions.y, bbox_object.shape.dimensions.z};

// update lf, lr
lf_ = bounding_box_.length * 0.3; // 30% front from the center
lr_ = bounding_box_.length * 0.25; // 25% rear from the center
lf_ = std::max(bounding_box_.length * 0.3, 1.0); // 30% front from the center, minimum of 1.0m
lr_ = std::max(bounding_box_.length * 0.25, 1.0); // 25% rear from the center, minimum of 1.0m

return true;
}
Expand Down
Loading