Skip to content

Commit

Permalink
feat: suppress warning/error of the empty predicted trajectory by MPC (
Browse files Browse the repository at this point in the history
…#9373)

Signed-off-by: Takayuki Murooka <[email protected]>
  • Loading branch information
takayuki5168 authored Nov 19, 2024
1 parent 2e0d5de commit a7cc44d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions control/autoware_control_validator/src/control_validator.cpp
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

0 comments on commit a7cc44d

Please sign in to comment.