-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
New Traffic Manager features for 0.9.13 #4786
Conversation
Added new constants
Fixed collisions at high speed.
Implementation of RoadOption for SimpleWaypoints Implementation of GetNextAction and GetActionBuffer for TM actions Parameters for setting the path import and starting the import process. Other minor changes
Introduced getter in PythonAPI for high level path Introduced getter in PythonAPI for next high level action Introduced parameters for random lane changes Fixed keep right parameter
… controlled vehicles. Method in Localization Stage to compute a path using RoadOptions.
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes. |
…m/carla-simulator/carla into jackbart94/parameter_import_route
Cleanup
Cleanup of SetRoadOption Added debug_helper in Loc Stage (to be removed)
Fixed lane changes representation in those methods Now get_next_action and get_all_actions need the Actor in Python
Set MAX_BRAKE to 0.7
Adding constants for VLStage Changes in VLStage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 4 files at r2, 1 of 17 files at r3, 3 of 13 files at r6, 1 of 1 files at r7, 2 of 7 files at r8, 2 of 13 files at r9.
Reviewable status: 6 of 26 files reviewed, 4 unresolved discussions (waiting on @glopezdiest, @jackbart94, and @joel-mb)
LibCarla/source/carla/trafficmanager/InMemoryMap.h, line 20 at r8 (raw file):
#include "carla/client/Map.h" #include "carla/client/Waypoint.h" #include "carla/client/DebugHelper.h"
Is this needed?
LibCarla/source/carla/trafficmanager/LocalizationStage.h, line 58 at r9 (raw file):
mported_waypoints
I would call this argument imported_locations
or imported_path
. imported_waypoints
can be confusing because we are not using waypoints.
LibCarla/source/carla/trafficmanager/LocalizationStage.h, line 63 at r9 (raw file):
imported_route
I would call this argument imported_actions
if we use imported_locations
in the previous one.
LibCarla/source/carla/trafficmanager/LocalizationStage.cpp, line 169 at r9 (raw file):
imported_points
I would call this imported_path
or imported_locations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 6 of 26 files reviewed, 2 unresolved discussions (waiting on @glopezdiest and @joel-mb)
LibCarla/source/carla/trafficmanager/InMemoryMap.h, line 20 at r8 (raw file):
Previously, joel-mb wrote…
Is this needed?
Done.
LibCarla/source/carla/trafficmanager/LocalizationStage.cpp, line 169 at r9 (raw file):
Previously, joel-mb wrote…
imported_points
I would call this
imported_path
orimported_locations
Done.
Changes name of variables in Loc stage Removed unnecessary import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 5 files at r10, 2 of 4 files at r11, 1 of 5 files at r12, all commit messages.
Reviewable status: 8 of 26 files reviewed, all discussions resolved (waiting on @glopezdiest)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 19 files at r1, 1 of 17 files at r3, 2 of 13 files at r6, 1 of 7 files at r8, 7 of 13 files at r9, 1 of 5 files at r10, 1 of 4 files at r11, 4 of 5 files at r12.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jackbart94)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r13, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jackbart94)
Description
New Traffic Manager features for 0.9.13. This PR includes:
The option for users to use
traffic_manager.set_path(actor, path)
to pass a list of carla.Location elements to a vehicle controlled by the Traffic Manager, which will follow the given path. This has some limitations, given by the amount and the location of points in the path. Users should be aware that, in order for it to work, the locations should not be inside intersections (because routes sometimes overlap) and should give at least one location between two different intersections.Introduction of a RoadOption element in each SimpleWaypoint, which can be: Void, Left, Right, Straight, LaneFollow, RoadEnd. Currently developing a way to have more options, so that if an intersection has more than one exits that go left, they can be identified separately.
Users can now get the next action that a vehicle will perform (
traffic_manager.get_next_action(actor)
), or the whole action buffer that the vehicle has already planned. (traffic_manager.get_all_actions(actor)
). The first one will return a list with two elements, the first one being the next RoadOption, the second being the waypoint where it's going to be performed. If there's no particular action other than following the lane, the action returned will be LaneFollow and the waypoint will be the furthest in the buffer. The second one will return a list of lists with two elements, which will be the same as before, with each RoadOption that will be performed and the waypoint where said RoadOption is going to begin. If it's only lane following, the same principle as get_next_action is applied.The option for users to use
traffic_manager.set_route(actor, route)
to pass a list of RoadOptions (in the form of strings) to a vehicle controlled by the Traffic Manager, which will follow the given high-level route. This has currently some limitations, given by the fact that there might be more than one exit with the same RoadOption name, and also doesn't work with lane changes.Fixes
traffic_manager.keep_right_rule_percentage(actor, percentage) parameter
and traffic_manager.set_distance_leading_vehicle(actor, percentage)Introduces
traffic_manager.random_left_lanechange_percentage(actor, percentage)
andtraffic_manager.random_right_lanechange_percentage(actor, percentage)
, which allow the user to set a random chance for a vehicle to perform a lane change at any given frame. Vehicles already have a policy for lane changes, this parameter will just try to trigger a forced lane changes, and only while the vehicle is moving with some velocity.Improved braking of vehicles, according to new physics.
Changes in new VehicleLightStage.
Where has this been tested?
Possible Drawbacks
Requires quite some testing to avoid possible edge cases.
This change is