Feature/turn signals
Implemented feature
This PR adds turn signals to be triggered at waypoints before lane changes.
Description
By law, the vehicle must use turn signals at every lane changes and decision_maker
currently does not support this for waypoint following. While the turn signals are triggered at intersections as decision_maker
inserts turn signal triggers in waypoints' steering_state
for lane changes, there's nothing in decision_maker
for lane changes.
Implementation description
The fix extends the existing solution for turn signals at intersections. The waypoints not used at intersections for turn signals are used for turn signals at lane changes. The filtered waypoints will iterate through white lines of the road (lanes) to determine if any of these waypoints cross the lane. If any of these waypoints cross a lane, the turning steering_state
will be inserted to trigger turn signals 30 meters (100 ft) before the intersecting point.
Note
The fix avoids code changes to autoware_msgs by using already available steering_state
for turn signals.
https://gitlab.com/autowarefoundation/autoware.ai/messages/blob/master/autoware_msgs/msg/WaypointState.msg#L8-11
How to test - Simulate using a bag
- Start
roscore
- Play a rosbag with sensor data from Peoria while running Autoware
- Localize
- Make sure to
Engage
usingdecision_maker
so it will simulate driving scenario in state machine. - Check for turn signal commands:
rostopic echo /vehicle_cmd | grep lamp_cmd -A 8
to checkl
value should change to 1 at left turns andr
value should change to 1 at right turns. You can also runrqt_plot /vehicle_cmd/lamp_cmd
to see these values spike up to 1 from 0.
Details on this implementation described here: https://autonomoustuff.atlassian.net/jira/software/projects/OAP/boards/50?assignee=5c76da65f95d241e4905f57c&selectedIssue=OAP-57
Test
Tested on Ubuntu 16.04 & ROS Kinetic on Peoria Downtown map with OAP4 test path