提交 d23c3588 编写于 作者: Y Yifei Jiang

planning: fixed a bug in header generation.

上级 11fa482a
......@@ -43,7 +43,7 @@ apollo::common::Status PlanningBase::Init(const PlanningConfig& config) {
void PlanningBase::FillPlanningPb(const double timestamp,
ADCTrajectory* const trajectory_pb) {
trajectory_pb->mutable_header()->set_timestamp_sec(timestamp);
if (!local_view_.prediction_obstacles->has_header()) {
if (local_view_.prediction_obstacles->has_header()) {
trajectory_pb->mutable_header()->set_lidar_timestamp(
local_view_.prediction_obstacles->header().lidar_timestamp());
trajectory_pb->mutable_header()->set_camera_timestamp(
......
......@@ -25,6 +25,8 @@ from modules.canbus.proto import chassis_pb2
from modules.drivers.proto import pointcloud_pb2
from module_control_analyzer import ControlAnalyzer
from module_planning_analyzer import PlannigAnalyzer
from modules.perception.proto import perception_obstacle_pb2
from modules.prediction.proto import prediction_obstacle_pb2
from lidar_endtoend_analyzer import LidarEndToEndAnalyzer
......@@ -65,6 +67,13 @@ def process(control_analyzer, planning_analyzer, lidar_endtoend_analyzer, is_sim
point_cloud.ParseFromString(msg.message)
lidar_endtoend_analyzer.put_lidar(point_cloud)
if msg.topic == "/apollo/perception/obstacles":
perception = perception_obstacle_pb2.PerceptionObstacles()
perception.ParseFromString(msg.message)
if msg.topic == "/apollo/prediction":
prediction = prediction_obstacle_pb2.PredictionObstacles()
prediction.ParseFromString(msg.message)
if __name__ == "__main__":
if len(sys.argv) < 2:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册