You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue regarding usage of new Waypoint API with points of types other than carla.LaneType.Driving, specifically carla.LaneType.Sidewalk.
It seems that, while since 0.9.5 there is version of Map.get_waypoint with parameter lane_type, when project_to_road is set to False and type other than Driving is chosen, it always returns None instead of waypoint, effectively blocking from fetching paths for walkers.
(See PythonAPI/examples/pedestrian_automatic.py and related PythonAPI/carla/agents/navigation/pedestrian_agent.py on branch pedestrian-walkingin my fork).
Is this lack of implementation, or my misuse? I see that OpenDrive xodr files of built-in maps have information on sidewalks which is parsed by Carla, yet both Map.get_topology [1] and Map.get_waypoint methods seem to omit them completely.
[1] -- on provided pedestrian-walking branch there is a slightly modified version of Map.cpp, which includes sidewalks in topology -- there is still no possibility to fetch any sidewalk-based waypoint.
The text was updated successfully, but these errors were encountered:
d0m3k
changed the title
Map.get_waypoint/3
Map.get_waypoint/3 doesn't work for carla.LaneType.Sidewalk
May 14, 2019
project_to_road=False is used to determine if a location, where you asked for a waypoint, is inside the lane (road lane, sidewalk, shoulder...) of the nearest waypoint (of the type lane_type), if the location is outside the lane, the result of this waypoint is None. This is useful, for instance, if you want to know if your car is inside the road.
Could be, that you get None because these locations that you are asking, they are not inside the lane itself?
My case was using pedestrians spawned on spawn points dedicated for cars, so, if it should return None when no Sidewalk-type waypoint is available in close proximity, what you describe is valid; the script asks for waypoint based on current pedestrian location (and that would fail, for it's walking in the middle of road dedicated for cars).
So if I understand correctly, project_to_road set to True should try to find the closest path available on the lane of required type? Because from what I saw during my tests, whatever value I set as lane_type, when project_to_road=True, waypoints were exactly the same as for Driving lane, at least on 0.9.5 on Town05. (I'll try it again to be sure I'm not doing anything stupid when project rebuilds confirmed for Town02 and Town05).
UPDATE #2: There must be an error in my implementation, because I just modified lane_explorer.py and successfully rendered data on sidewalks; there are no junctions between sidewalks for them, though.
Lemme close it for time of rewrite; thank you for your help!
Using CARLA 0.9.5 on Ubuntu 16.04, on map
Town05
:I have an issue regarding usage of new Waypoint API with points of types other than
carla.LaneType.Driving
, specificallycarla.LaneType.Sidewalk
.It seems that, while since 0.9.5 there is version of
Map.get_waypoint
with parameterlane_type
, whenproject_to_road
is set toFalse
and type other thanDriving
is chosen, it always returnsNone
instead of waypoint, effectively blocking from fetching paths for walkers.(See
PythonAPI/examples/pedestrian_automatic.py
and relatedPythonAPI/carla/agents/navigation/pedestrian_agent.py
on branchpedestrian-walking
in my fork).Is this lack of implementation, or my misuse? I see that OpenDrive
xodr
files of built-in maps have information on sidewalks which is parsed by Carla, yet bothMap.get_topology
[1] andMap.get_waypoint
methods seem to omit them completely.[1] -- on provided
pedestrian-walking
branch there is a slightly modified version ofMap.cpp
, which includes sidewalks in topology -- there is still no possibility to fetch any sidewalk-based waypoint.The text was updated successfully, but these errors were encountered: