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: suppress warning/error of the empty predicted trajectory by MPC #9373

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 @@ -191,9 +191,7 @@ void ControlValidator::validate(
const Odometry & kinematics)
{
if (predicted_trajectory.points.size() < 2) {
RCLCPP_ERROR_THROTTLE(
get_logger(), *get_clock(), 1000,
"predicted_trajectory size is less than 2. Cannot validate.");
RCLCPP_DEBUG(get_logger(), "predicted_trajectory size is less than 2. Cannot validate.");
return;
}
if (reference_trajectory.points.size() < 2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ bool LaneDepartureCheckerNode::isDataValid()
}

if (predicted_trajectory_->points.empty()) {
RCLCPP_ERROR_THROTTLE(
get_logger(), *get_clock(), 5000, "predicted_trajectory is empty. Not expected!");
RCLCPP_DEBUG(get_logger(), "predicted_trajectory is empty. Not expected!");
return false;
}

Expand Down
6 changes: 6 additions & 0 deletions control/autoware_mpc_lateral_controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ Return LateralOutput which contains the following to the controller node
- LateralSyncData
- steer angle convergence

Publish the following messages.

| Name | Type | Description |
| ------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `~/output/predicted_trajectory` | autoware_planning_msgs::Trajectory | Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory. |

### MPC class

The `MPC` class (defined in `mpc.hpp`) provides the interface with the MPC algorithm.
Expand Down
Loading