提交 689542ef 编写于 作者: Z Zhang Liangliang 提交者: Liangliang Zhang

Planning: output lane id in topic.

上级 61f87fd2
......@@ -127,6 +127,14 @@ ADCTrajectory::RightOfWayStatus ReferenceLineInfo::GetRightOfWayStatus() const {
const hdmap::RouteSegments& ReferenceLineInfo::Lanes() const { return lanes_; }
const std::list<hdmap::Id> ReferenceLineInfo::TargetLaneId() const {
std::list<hdmap::Id> lane_ids;
for (const auto& lane_seg : lanes_) {
lane_ids.push_back(lane_seg.lane->id());
}
return lane_ids;
}
const SLBoundary& ReferenceLineInfo::AdcSlBoundary() const {
return adc_sl_boundary_;
}
......
......@@ -108,6 +108,7 @@ class ReferenceLineInfo {
bool IsDrivable() const;
const hdmap::RouteSegments& Lanes() const;
const std::list<hdmap::Id> TargetLaneId() const;
void ExportDecision(DecisionResult* decision_result) const;
......
......@@ -388,6 +388,9 @@ Status Planning::Plan(const double current_time_stamp,
// set right of way status
trajectory_pb->set_right_of_way_status(
best_reference_line->GetRightOfWayStatus());
for (const auto& id : best_reference_line->TargetLaneId()) {
trajectory_pb->add_lane_id()->CopyFrom(id);
}
best_reference_line->ExportDecision(trajectory_pb->mutable_decision());
......
......@@ -6,6 +6,7 @@ import "modules/common/proto/header.proto";
import "modules/common/proto/vehicle_signal.proto";
import "modules/common/proto/pnc_point.proto";
import "modules/canbus/proto/chassis.proto";
import "modules/map/proto/map_id.proto";
import "modules/planning/proto/decision.proto";
import "modules/planning/proto/planning_internal.proto";
......@@ -70,7 +71,7 @@ message LatencyStats {
optional double init_frame_time_ms = 3;
}
// next id: 18
// next id: 19
message ADCTrajectory {
optional apollo.common.Header header = 1;
......@@ -109,4 +110,7 @@ message ADCTrajectory {
PROTECTED = 1;
}
optional RightOfWayStatus right_of_way_status = 17;
// lane id along reference line
repeated apollo.hdmap.Id lane_id = 18;
}
......@@ -1741,3 +1741,6 @@ routing_header {
sequence_num: 1
}
right_of_way_status: UNPROTECTED
lane_id {
id: "1_-1"
}
......@@ -1740,3 +1740,6 @@ routing_header {
sequence_num: 1
}
right_of_way_status: UNPROTECTED
lane_id {
id: "1_-1"
}
......@@ -1740,3 +1740,6 @@ routing_header {
sequence_num: 1
}
right_of_way_status: UNPROTECTED
lane_id {
id: "1_-1"
}
......@@ -1755,3 +1755,6 @@ routing_header {
sequence_num: 1
}
right_of_way_status: UNPROTECTED
lane_id {
id: "1_-1"
}
......@@ -1111,3 +1111,6 @@ routing_header {
sequence_num: 1
}
right_of_way_status: UNPROTECTED
lane_id {
id: "1_-1"
}
......@@ -1605,3 +1605,6 @@ routing_header {
sequence_num: 2
}
right_of_way_status: UNPROTECTED
lane_id {
id: "40_1_-2"
}
......@@ -1717,3 +1717,6 @@ routing_header {
sequence_num: 8
}
right_of_way_status: UNPROTECTED
lane_id {
id: "57_1_-1"
}
......@@ -1284,3 +1284,12 @@ routing_header {
sequence_num: 1
}
right_of_way_status: UNPROTECTED
lane_id {
id: "752_1_-1"
}
lane_id {
id: "753_1_-1"
}
lane_id {
id: "6_1_-2"
}
......@@ -1732,3 +1732,18 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "140_1_-1"
}
lane_id {
id: "747_1_-1"
}
lane_id {
id: "141_1_-2"
}
lane_id {
id: "906_1_-1"
}
lane_id {
id: "9_1_-2"
}
......@@ -1283,3 +1283,15 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "37_1_-4"
}
lane_id {
id: "38_1_-4"
}
lane_id {
id: "84_1_-1"
}
lane_id {
id: "58_1_-2"
}
......@@ -1754,3 +1754,15 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "747_1_-1"
}
lane_id {
id: "141_1_-2"
}
lane_id {
id: "906_1_-1"
}
lane_id {
id: "9_1_-2"
}
......@@ -1741,3 +1741,6 @@ routing_header {
sequence_num: 3
}
right_of_way_status: UNPROTECTED
lane_id {
id: "57_1_-1"
}
......@@ -1587,3 +1587,12 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "138_1_-1"
}
lane_id {
id: "144_1_-1"
}
lane_id {
id: "140_1_-1"
}
......@@ -1480,3 +1480,18 @@ routing_header {
sequence_num: 2
}
right_of_way_status: UNPROTECTED
lane_id {
id: "12_1_-3"
}
lane_id {
id: "133_1_-3"
}
lane_id {
id: "88_1_-1"
}
lane_id {
id: "21_1_-1"
}
lane_id {
id: "22_1_-1"
}
......@@ -1732,3 +1732,18 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "39_1_-3"
}
lane_id {
id: "37_1_-4"
}
lane_id {
id: "38_1_-4"
}
lane_id {
id: "84_1_-1"
}
lane_id {
id: "58_1_-2"
}
......@@ -1732,3 +1732,18 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "39_1_-3"
}
lane_id {
id: "37_1_-4"
}
lane_id {
id: "38_1_-4"
}
lane_id {
id: "84_1_-1"
}
lane_id {
id: "58_1_-2"
}
......@@ -1754,3 +1754,12 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "141_1_-2"
}
lane_id {
id: "906_1_-1"
}
lane_id {
id: "9_1_-2"
}
......@@ -1813,3 +1813,15 @@ routing_header {
module_name: "routing"
}
right_of_way_status: UNPROTECTED
lane_id {
id: "28_1_-1"
}
lane_id {
id: "27_1_-1"
}
lane_id {
id: "81_1_-1"
}
lane_id {
id: "160_1_-3"
}
......@@ -134,7 +134,8 @@ void MoveSequencePredictor::Predict(Obstacle* obstacle) {
<< "] will draw a lane sequence trajectory [" << ToString(sequence)
<< "] with probability [" << sequence.probability() << "].";
std::string curr_lane_id = sequence.lane_segment(0).lane_id();
// TODO(Prediction): remove the following line
// std::string curr_lane_id = sequence.lane_segment(0).lane_id();
std::vector<TrajectoryPoint> points;
DrawMoveSequenceTrajectoryPoints(*obstacle, sequence,
FLAGS_prediction_duration,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册