Skip to content

Commit

Permalink
fix(vehicle_cmd_gate): add missing time stamp (#530)
Browse files Browse the repository at this point in the history
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
  • Loading branch information
taikitanaka3 authored and yn-mrse committed Apr 8, 2022
1 parent 4e2ff41 commit 74e489e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,10 @@ autoware_auto_control_msgs::msg::AckermannControlCommand VehicleCmdGate::createS
const
{
autoware_auto_control_msgs::msg::AckermannControlCommand cmd;
cmd.stamp = this->now();
const auto t = this->now();
cmd.stamp = t;
cmd.lateral.stamp = t;
cmd.longitudinal.stamp = t;
cmd.lateral.steering_tire_angle = current_steer_;
cmd.lateral.steering_tire_rotation_rate = 0.0;
cmd.longitudinal.speed = 0.0;
Expand All @@ -527,7 +530,10 @@ autoware_auto_control_msgs::msg::AckermannControlCommand
VehicleCmdGate::createEmergencyStopControlCmd() const
{
autoware_auto_control_msgs::msg::AckermannControlCommand cmd;

const auto t = this->now();
cmd.stamp = t;
cmd.lateral.stamp = t;
cmd.longitudinal.stamp = t;
cmd.lateral.steering_tire_angle = prev_control_cmd_.lateral.steering_tire_angle;
cmd.lateral.steering_tire_rotation_rate = prev_control_cmd_.lateral.steering_tire_rotation_rate;
cmd.longitudinal.speed = 0.0;
Expand Down

0 comments on commit 74e489e

Please sign in to comment.