Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“GetLaneInfoByS: No connecting lane” issue with pedestrian models #343

Closed
Abhiram-R opened this issue Nov 4, 2022 · 8 comments
Closed

Comments

@Abhiram-R
Copy link

Hi,
I’m using the map “fabriksgatan.xodr”. I simply added a pedestrian using lanePosition in road 2, lane -3 and s 295. (default orientation) and ran the xosc file.

The pedestrian follows the road in the order 2->16->3. But the simulator does not seem to find the connecting lane properly. Therefore the pedestrian instantly gets positioned into the nearest “driving” lane. How can I fix this?

@csawp
Copy link
Contributor

csawp commented Nov 4, 2022

Last default value of function parameter int laneTypeMask = Lane::LaneType::LANE_TYPE_ANY_DRIVING
Try to solve the problem?
laneTypeMask =Lane::LaneType::LANE_TYPE_ANY

@Abhiram-R
Copy link
Author

Hi. Based on what I understood, I changed the laneTypeMask = Lane::LaneType::LANE_TYPE_ANY_DRIVING in RoadManager.hpp to laneTypeMask =Lane::LaneType::LANE_TYPE_ANY and rebuilt the package (xcode). However, the issue is still present. Is this the right way to do this or have I missed anything before build?

@csawp
Copy link
Contributor

csawp commented Nov 5, 2022

The default parameters of the repair header file are useless
You need to call the SetSnapLaneTypes function before calling the GetLaneInfoByS function
If the problem has not been solved, you need to share a simple XODR file for the author to analyze the problem

1 similar comment
@csawp
Copy link
Contributor

csawp commented Nov 5, 2022

The default parameters of the repair header file are useless
You need to call the SetSnapLaneTypes function before calling the GetLaneInfoByS function
If the problem has not been solved, you need to share a simple XODR file for the author to analyze the problem

@Abhiram-R
Copy link
Author

I have made changes to SetSnapLaneTypes to consider LANE_TYPE_ANY only when the object type is a pedestrian, else take it as LANE_TYPE_ANY_DRIVING. It seems to be working now.

eknabevcc added a commit that referenced this issue Nov 5, 2022
Moving objects has so far only recognized driving lanes. Now pedestrians
also will snap to sidewalks as well. Fixes issue whith pedestrians
unable to follow connected lanes of type sidewalk.
@eknabevcc
Copy link
Collaborator

Thanks for reporting this limitation. I see you found a way.

I think this is an important use case so I've changed the behavior so that pedestrians will by default snap to sidewalks as well.

In addition I made road sensors active and visible for pedestrians as well.
walk

Please pull latest from master and try out.

You can try attached scenario file: walk.xosc.txt
Control pedestrian with keyboard (arrow keys)

Run as: ./bin/esmini --window 60 60 800 400 --osc ./resources/tmp/walk.xosc --road_features on

@Abhiram-R
Copy link
Author

Yes, it is working fine now. Thank you for fixing this.

@eknabevcc
Copy link
Collaborator

Thanks for feedback results. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants