ApolloAuto/apollo

Usage of GetProjection()

Closed this issue · 10 comments

We appreciate you go through Apollo documentations and search previous issues before creating an new one. If neither of the sources helped you with your issues, please report the issue using the following form. Please note missing info can delay the response time.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 14.04): 16.04
  • Apollo installed from (source or binary): Source
  • Apollo version (1.0, 1.5, 2.0, 2.5, 3.0): 3.0

Can anybody please explain me how GetProjection() function works and what it is used for.?

BR

@BoChang11 could you be more specific? Which file are you currently looking at?

@natashadsouza hd_map_common_test.cc, could you please explain what is the task of this function GetProjection().
I am trying to find the distance travelled by Autonomous vehicle over time. It would be great if you could help me with the useful function.

BR

@BoChang11 take a look at hdmap_common.h for additional details regarding the function.
Let me know if you have any additional questions. Thanks!

@natashadsouza Thanks for the reply. I will look into the program in hdmap_common.h and update you.

Could you please let me know is there a I can calculate/monitor the distance covered by autonomous vehicle during the course of the journey ?

BR

@natashadsouza Did you get chance to look at the query?

@BoChang11 sorry for the delay in responding. Currently there is no way to monitor the distance travelled by the car. It is a great suggestion though and something we would definitely consider as a feature request. Would you help me understand what you are trying to accomplish by calculating this?

@natashadsouza I want to keep track of the distance for every new route given, which will be used in making some of the decisions.

Thank you,
BR

@natashadsouza

I got the solution. We can get the distance covered by the ego vehicle in current lane segment by using GetProjection() as given below:

double adc_s = 0;
double adc_l = 0;
bool temp_ret = current_lane->GetProjection(car_point, &adc_s, &adc_l);

@BoChang11 that's great news. Do you mind making a pull request for others to also use it.

Closed due to inactivity. If the problem persists, pls feel free to reopen it or create a new one and refer to it.