Hi Team,
I am reading the code of Apollo v6.0.0 and have a question about the start_time in _modules/planning/planningcomponent.cc.
In the commit 26ae1720f57, start_time is moved from before FillHeader to after FillHeader.
ADCTrajectory adc_trajectory_pb;
planning_base_->RunOnce(local_view_, &adc_trajectory_pb);
common::util::FillHeader(node_->Name(), &adc_trajectory_pb);
// modify trajectory relative time due to the timestamp change in header
auto start_time = adc_trajectory_pb.header().timestamp_sec();
const double dt = start_time - adc_trajectory_pb.header().timestamp_sec();
for (auto& p : *adc_trajectory_pb.mutable_trajectory_point()) {
p.set_relative_time(p.relative_time() + dt);
}
planning_writer_->Write(adc_trajectory_pb);
Hi Team, I am reading the code of Apollo v6.0.0 and have a question about the start_time in _modules/planning/planningcomponent.cc. In the commit 26ae1720f57, start_time is moved from before FillHeader to after FillHeader.
May I ask why this modification is done? Thanks!