Skip to content

Commit

Permalink
Merge pull request #231 from AD-EYE/feature/safety_channel_output
Browse files Browse the repository at this point in the history
Feature/safety channel output
  • Loading branch information
sc-maxime authored and GitHub Enterprise committed Feb 17, 2022
2 parents b5d7a20 + 45c6dab commit d339567
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class SensorChecker: public SafetyFaultMonitor {

bool hasTestFailed() override;

std::string getMonitoredSensor();


bool isSensorActive();
};
Expand Down
70 changes: 60 additions & 10 deletions AD-EYE/ROS_Packages/src/AD-EYE/rviz/config.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ Panels:
Expanded:
- /TF1/Frames1
- /Safety Channel1
- /Safety Channel1/Grid map1
- /Autoware1
- /Autoware1/Maps1
- /Autoware1/Perception1
- /Autoware1/Planning1
- /Autoware1/Planning1/Global Planning1/Global Path1
Splitter Ratio: 0.695804
Tree Height: 922
Tree Height: 1282
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expand Down Expand Up @@ -181,6 +180,27 @@ Visualization Manager:
{}
Queue Size: 100
Value: true
- Align Bottom: false
Background Alpha: 0.800000012
Background Color: 0; 0; 0
Class: jsk_rviz_plugin/OverlayText
Enabled: true
Foreground Alpha: 0.800000012
Foreground Color: 25; 255; 240
Invert Shadow: false
Name: Safety Channel text
Overtake BG Color Properties: false
Overtake FG Color Properties: false
Overtake Position Properties: false
Topic: /safety_channel_text_overlay
Value: true
font: DejaVu Sans Mono
height: 128
left: 0
line width: 2
text size: 12
top: 0
width: 128
Enabled: true
Name: Safety Channel
- Class: rviz/Group
Expand Down Expand Up @@ -350,8 +370,18 @@ Visualization Manager:
Value: true
Grid: true
Safety Channel:
"": true
Grid map: true
Road Side Parking targeted for minimal risk condition: true
Safe Stop Planner:
Value: true
safe_stop_endposes_vis: true
safe_stop_traj_vis: true
Safety Channel Perception:
Cluster Cloud: true
Convex hulls: true
Value: true
Safety Channel text: true
Safety Supervisor critical area: true
Value: true
TF: true
Value: true
Expand Down Expand Up @@ -404,8 +434,18 @@ Visualization Manager:
Value: true
Grid: true
Safety Channel:
"": true
Grid map: true
Road Side Parking targeted for minimal risk condition: true
Safe Stop Planner:
Value: true
safe_stop_endposes_vis: true
safe_stop_traj_vis: true
Safety Channel Perception:
Cluster Cloud: true
Convex hulls: true
Value: true
Safety Channel text: true
Safety Supervisor critical area: true
Value: true
TF: true
Value: true
Expand Down Expand Up @@ -488,8 +528,18 @@ Visualization Manager:
Value: true
Grid: true
Safety Channel:
"": true
Grid map: true
Road Side Parking targeted for minimal risk condition: true
Safe Stop Planner:
Value: true
safe_stop_endposes_vis: true
safe_stop_traj_vis: true
Safety Channel Perception:
Cluster Cloud: true
Convex hulls: true
Value: true
Safety Channel text: true
Safety Supervisor critical area: true
Value: true
TF: true
Value: true
Expand Down Expand Up @@ -747,7 +797,7 @@ Visualization Manager:
Views:
Current:
Class: rviz/ThirdPersonFollower
Distance: 39.892189
Distance: 69.9238434
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
Expand Down Expand Up @@ -782,10 +832,10 @@ Window Geometry:
collapsed: false
Displays:
collapsed: false
Height: 1056
Height: 1416
Hide Left Dock: false
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd000000040000000000000196000003dafc020000001cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afc00000028000003da000000d600fffffffa000000020100000003fb0000000a0049006d0061006700650000000000ffffffff0000000000000000fb0000000c00430061006d0065007200610000000000ffffffff0000000000000000fb000000100044006900730070006c0061007900730100000000000001360000016a00fffffffb0000003c00520061007700200049006d006100670065002000540072006100660066006900630020004c0069006700680074002000430061006d00650072006100000002e2000001060000001600fffffffb0000002e00540072006100660066006900630020004c006900670068007400200064006500740065006300740069006f006e000000023d000001a70000001600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000120049006d006100670065005f0072006100770000000000ffffffff0000000000000000fb0000000c00430061006d006500720061000000030a000000e50000000000000000fb000000120049006d00610067006500200052006100770100000421000000160000000000000000fb0000000a0049006d00610067006501000002f4000000cb0000000000000000fb0000000c00430061006d0065007200610000000335000000cd0000000000000000fb0000000a0049006d00610067006501000002ac000001560000000000000000fb0000000c00430061006d00650072006103000008d4000000b40000042300000297fb0000000c00430061006d00650072006101000002aa000001580000000000000000fb0000000a0049006d006100670065000000028d000000a20000000000000000fb0000000c00430061006d0065007200610000000335000000cd0000000000000000fb0000000a0049006d006100670065010000030b000000f70000000000000000fb0000003400430061006d0065007200610020003100200064006500740065006300740069006f006e0020006f007600650072006c006100790000000257000000cd0000001600fffffffb0000003400430061006d0065007200610020003200200064006500740065006300740069006f006e0020006f007600650072006c00610079000000032a000000be0000001600fffffffb0000002400430061006d00650072006100200031002000720061007700200069006d0061006700650000000276000000a00000001600fffffffb0000002400430061006d00650072006100200032002000720061007700200069006d00610067006500000002f1000000f70000001600fffffffb0000002e00430061006d006500720061002000310020006d00610072006b006500720020006f007600650072006c006100790000000318000000cc0000001600fffffffb0000002e00430061006d006500720061002000320020006d00610072006b006500720020006f007600650072006c006100790000000318000000cc0000001600fffffffb0000004600540072006100660066006900630020004c0069006700680074002000430061006d0065007200610020006d00610072006b006500720020006f007600650072006c0061007900000003680000007c0000001600ffffff0000000100000132000003ccfc0200000003fc0000003a000003cc0000000000fffffffa000000000100000002fb0000000a0049006d0061006700650000000000ffffffff0000000000000000fb0000000a00560069006500770073000000060d000001320000010f00fffffffb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b20000000000000000000000020000073f000000a8fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000069a0000005cfc0100000002fb0000000800540069006d006500000000000000069a0000030000fffffffb0000000800540069006d00650100000000000004500000000000000000000005e4000003da00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
QMainWindow State: 000000ff00000000fd00000004000000000000019600000542fc020000001cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afc0000002800000542000000d600fffffffa000000020100000003fb0000000a0049006d0061006700650000000000ffffffff0000000000000000fb0000000c00430061006d0065007200610000000000ffffffff0000000000000000fb000000100044006900730070006c0061007900730100000000000001360000016a00fffffffb0000003c00520061007700200049006d006100670065002000540072006100660066006900630020004c0069006700680074002000430061006d00650072006100000002e2000001060000001600fffffffb0000002e00540072006100660066006900630020004c006900670068007400200064006500740065006300740069006f006e000000023d000001a70000001600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000120049006d006100670065005f0072006100770000000000ffffffff0000000000000000fb0000000c00430061006d006500720061000000030a000000e50000000000000000fb000000120049006d00610067006500200052006100770100000421000000160000000000000000fb0000000a0049006d00610067006501000002f4000000cb0000000000000000fb0000000c00430061006d0065007200610000000335000000cd0000000000000000fb0000000a0049006d00610067006501000002ac000001560000000000000000fb0000000c00430061006d00650072006103000008d4000000b40000042300000297fb0000000c00430061006d00650072006101000002aa000001580000000000000000fb0000000a0049006d006100670065000000028d000000a20000000000000000fb0000000c00430061006d0065007200610000000335000000cd0000000000000000fb0000000a0049006d006100670065010000030b000000f70000000000000000fb0000003400430061006d0065007200610020003100200064006500740065006300740069006f006e0020006f007600650072006c006100790000000257000000cd0000001600fffffffb0000003400430061006d0065007200610020003200200064006500740065006300740069006f006e0020006f007600650072006c00610079000000032a000000be0000001600fffffffb0000002400430061006d00650072006100200031002000720061007700200069006d0061006700650000000276000000a00000001600fffffffb0000002400430061006d00650072006100200032002000720061007700200069006d00610067006500000002f1000000f70000001600fffffffb0000002e00430061006d006500720061002000310020006d00610072006b006500720020006f007600650072006c006100790000000318000000cc0000001600fffffffb0000002e00430061006d006500720061002000320020006d00610072006b006500720020006f007600650072006c006100790000000318000000cc0000001600fffffffb0000004600540072006100660066006900630020004c0069006700680074002000430061006d0065007200610020006d00610072006b006500720020006f007600650072006c0061007900000003680000007c0000001600ffffff0000000100000132000003ccfc0200000003fc0000003a000003cc0000000000fffffffa000000000100000002fb0000000a0049006d0061006700650000000000ffffffff0000000000000000fb0000000a00560069006500770073000000060d000001320000010f00fffffffb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b20000000000000000000000020000073f000000a8fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000069a0000005cfc0100000002fb0000000800540069006d006500000000000000069a0000030000fffffffb0000000800540069006d00650100000000000004500000000000000000000008230000054200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Raw Image Traffic Light Camera:
collapsed: false
Selection:
Expand All @@ -800,6 +850,6 @@ Window Geometry:
collapsed: false
Views:
collapsed: true
Width: 1920
X: 0
Width: 2495
X: 65
Y: 24
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,31 @@ bool SensorChecker::hasTestFailed() {
return !isSensorActive();
}

std::string SensorChecker::getMonitoredSensor() {
switch (sensor_to_monitor_) {
case SENSOR_TYPE::radar:
return "radar";
case SENSOR_TYPE::lidar:
return "lidar";
case SENSOR_TYPE::camera1:
return "camera1";
case SENSOR_TYPE::camera2:
return "camera2";
case SENSOR_TYPE::cameratl:
return "cameratl";
}
}

bool SensorChecker::isSensorActive() {
if(!sensors_fov_flag_) {
ROS_WARN("Sensor monitor node is not publishing");
return false;
}
else if(!sensors_fov_.polygons.at(sensor_to_monitor_).polygon.points.empty()) {
return true;
}
ROS_WARN_STREAM("Sensor " << getMonitoredSensor() << " timed out");
return false;
}

SensorChecker::~SensorChecker() {
Expand Down
Loading

0 comments on commit d339567

Please sign in to comment.