libOpenDRIVE icon indicating copy to clipboard operation
libOpenDRIVE copied to clipboard

get road id and s/t coordinates given xyz point

Open saoraozhe3hao opened this issue 3 years ago • 27 comments

Is it possible that provide a function named get_roadid_st_list_by_xy in C++

saoraozhe3hao avatar Sep 02 '22 02:09 saoraozhe3hao

Please describe in more detail what function you need

pageldev avatar Sep 03 '22 12:09 pageldev

I am sorry. I am not good at English. I am trying to describe clearly. There is a function named get_xyz in Road.h. It return world xyz with inputting s and t. We need the reverse function which return roadid,s,t with inputting xyz or return roadid,s,t list with inputting xy

saoraozhe3hao avatar Sep 05 '22 06:09 saoraozhe3hao

Ok. I understand. I will be adding that query feature.

pageldev avatar Oct 01 '22 16:10 pageldev

Hello @grepthat, do you already have an update here? I am also very interested in that feature.

lrstttl avatar Feb 08 '23 10:02 lrstttl

I am sorry. I am not good at English. I am trying to describe clearly. There is a function named get_xyz in Road.h. It return world xyz with inputting s and t. We need the reverse function which return roadid,s,t with inputting xyz or return roadid,s,t list with inputting xy

@saoraozhe3hao Hi, you said get_xyz() function return world xyz , but in my case there is something wrong.. Coordinate is different from world coordinate. " tmp_xyz = odr_road.get_xyz(1.0, 0.0, 0.0); " I use this line to get world coordinate What is the problem. plz let me know

Jmingyu0822 avatar Feb 13 '23 06:02 Jmingyu0822

When loading the map via odr::OpenDriveMap odr_map("data.xodr"); the default option is to center the map. So you would probably need to add OpenDriveMap::x_offs and y_offs to your point to get the correct world coordinate.

pageldev avatar Feb 20 '23 20:02 pageldev

Ok. I understand. I will be adding that query feature.

is here has the feature?

wangwei-anye avatar Mar 28 '23 02:03 wangwei-anye

I‘ve implemented the query feature, but i don't konw how to sync it to github.

20231025192940 20231025193035

JuddiW avatar Oct 25 '23 11:10 JuddiW

@JuddiW looks good, I would like to try if it works. What do you mean by syncing? You can have a look at this guide: https://gist.github.com/Chaser324/ce0505fbed06b947d962

lrstttl avatar Oct 25 '23 12:10 lrstttl

@lrstttl > @JuddiW looks good, I would like to try if it works. What do you mean by syncing? You can have a look at this guide: https://gist.github.com/Chaser324/ce0505fbed06b947d962

Thank you for your help, I will try it.

JuddiW avatar Oct 26 '23 04:10 JuddiW

@lrstttl > @JuddiW looks good, I would like to try if it works. What do you mean by syncing? You can have a look at this guide: https://gist.github.com/Chaser324/ce0505fbed06b947d962

Thank you for your help, I will try it.

So is the query feature merged?

rpf1019 avatar Dec 26 '23 02:12 rpf1019