apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Question about ObstacleClusters::GetLaneGraph()

Open wanggujin opened this issue 7 years ago • 5 comments

Apollo 5.0 ObstacleClusters::GetLaneGraph

why only update start_s here ? there is no need to update end_s and adc_s ?

wanggujin avatar Aug 10 '19 07:08 wanggujin

@wanggujin Thanks for your question. The end_s is updated in obstacle.cc

kechxu avatar Aug 19 '19 18:08 kechxu

@kechxu Thank you. but i can't find that in obstacle.cc. can you give me a link?

wanggujin avatar Aug 21 '19 01:08 wanggujin

@wanggujin Sorry, my mistake. It is in road_graph.cc (https://github.com/ApolloAuto/apollo/blob/master/modules/prediction/common/road_graph.cc). Line 210 the function RoadGraph::ConstructLaneSequence.

Thanks

kechxu avatar Aug 27 '19 18:08 kechxu

@kechxu thanks. but you don't understand me. let me give you a example. Consider the following scenario: A lane, such as lane1 and it's length is 100m, and two obstacles on it. obstacle1 is located x=0 and obstacle2 is located x=60. when first call ObstacleClusters::GetLaneGraph for obstacle1, the lane_graphs_ map not include the key "lane1", so we construct it(assume we construct 50m, so the new LaneGraph's start_s is 0 and end_s is 50). But when second call the function for obstacle2 that it's also on lane1 the key "lane1" has existed in lane_graphs_ map, so we directly modify the existed LaneGraph's start_s from 0 to 60, then return it. Then the question becomes that the LaneGraph we returned for obstacle2, its start_s is 60, but end_s is still 50, because you don't modify it. i think it is a mistake. do you?

meanwhile, i have same question about adc_s.

wanggujin avatar Aug 28 '19 01:08 wanggujin

@wanggujin Yes, you are right. It seems to be a mistake. Thanks for bringing it to our attention. We will look into the code and fix this issue.

kechxu avatar Aug 28 '19 23:08 kechxu