Skip to content

Commit 4409d20

Browse files
authored
fix(control_validator): process died for an empty trajectory (#6365)
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
1 parent ad834d6 commit 4409d20

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

control/control_validator/src/control_validator.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ bool ControlValidator::isDataReady()
121121

122122
void ControlValidator::onReferenceTrajectory(const Trajectory::ConstSharedPtr msg)
123123
{
124+
if (msg->points.size() < 2) {
125+
RCLCPP_ERROR(get_logger(), "planning trajectory size is invalid (%lu)", msg->points.size());
126+
return;
127+
}
128+
124129
current_reference_trajectory_ = msg;
125130

126131
return;

0 commit comments

Comments
 (0)