Skip to content

Commit a7cc44d

Browse files
authored
feat: suppress warning/error of the empty predicted trajectory by MPC (#9373)
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
1 parent 2e0d5de commit a7cc44d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

control/autoware_control_validator/src/control_validator.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ void ControlValidator::validate(
191191
const Odometry & kinematics)
192192
{
193193
if (predicted_trajectory.points.size() < 2) {
194-
RCLCPP_ERROR_THROTTLE(
195-
get_logger(), *get_clock(), 1000,
196-
"predicted_trajectory size is less than 2. Cannot validate.");
194+
RCLCPP_DEBUG(get_logger(), "predicted_trajectory size is less than 2. Cannot validate.");
197195
return;
198196
}
199197
if (reference_trajectory.points.size() < 2) {

control/autoware_lane_departure_checker/src/lane_departure_checker_node/lane_departure_checker_node.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ bool LaneDepartureCheckerNode::isDataValid()
252252
}
253253

254254
if (predicted_trajectory_->points.empty()) {
255-
RCLCPP_ERROR_THROTTLE(
256-
get_logger(), *get_clock(), 5000, "predicted_trajectory is empty. Not expected!");
255+
RCLCPP_DEBUG(get_logger(), "predicted_trajectory is empty. Not expected!");
257256
return false;
258257
}
259258

control/autoware_mpc_lateral_controller/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ Return LateralOutput which contains the following to the controller node
7575
- LateralSyncData
7676
- steer angle convergence
7777

78+
Publish the following messages.
79+
80+
| Name | Type | Description |
81+
| ------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
82+
| `~/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. |
83+
7884
### MPC class
7985

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

0 commit comments

Comments
 (0)