18 #include <unordered_set>
51 double rating_min = 1e10;
52 double rating_max =-1e10;
55 rating_min = (
std::min)(rating_min,
g.rating);
56 rating_max = (
std::max)(rating_max,
g.rating);
62 plot(
g,
x,ss.str(),rating_min,rating_max);
75 static const double a = 1.0;
76 static const double b = 0.5;
77 static const double rmin = 0.0;
78 static const double rmax = 1.0;
79 static const double gmin = 0.7;
80 static const double gmax = 0.0;
81 static const double bmin = 0.0;
82 static const double bmax = 0.0;
89 const double L = std::sqrt(
g.anchor_dX *
g.anchor_dX +
g.anchor_dY*
g.anchor_dY);
90 std::stringstream options;
91 if(rating_max<=rating_min)
93 options<<
"LineColor=0,0.7,0;LineWidth=1";
97 const double p = (
g.rating-rating_min)/(rating_max-rating_min);
98 options<<
"LineColor=";
99 options<<( p * (rmax-rmin) + rmin)<<
",";
100 options<<( p * (gmax-gmin) + gmin)<<
",";
101 options<<( p * (bmax-bmin) + bmin)<<
";";
102 options<<
"LineWidth=1";
108 X[2] =
g.anchor_X +
g.anchor_dX/L * a;
109 Y[2] =
g.anchor_Y +
g.anchor_dY/L * a;
Definition: plot_gaps.h:27
adore::env::AFactory::TGapQueueReader * gapReader_
Definition: plot_gaps.h:33
std::string prefix_
Definition: plot_gaps.h:32
std::unordered_set< std::string > current_tags_
Definition: plot_gaps.h:29
void plot(adore::env::GapData &g, adore::env::VehicleMotionState9d x, std::string tag, double rating_min, double rating_max)
Definition: plot_gaps.h:71
void update()
Definition: plot_gaps.h:42
std::vector< std::string > last_tags_
Definition: plot_gaps.h:30
GapQueuePlotter(DLR_TS::PlotLab::AFigureStub *figure, std::string prefix, adore::env::AFactory::TGapQueueReader *gapReader, adore::env::AFactory::TVehicleMotionStateReader *egoStateReader)
Definition: plot_gaps.h:36
adore::env::AFactory::TVehicleMotionStateReader * egoStateReader_
Definition: plot_gaps.h:34
DLR_TS::PlotLab::AFigureStub * figure_
Definition: plot_gaps.h:31
plots markers for traffic gaps
Definition: plot_gaps.h:129
std::string prefix_
Definition: plot_gaps.h:133
adore::env::AFactory::TGapQueueReader * rightGapsReader_
Definition: plot_gaps.h:131
void update()
Definition: plot_gaps.h:157
GapQueuePlotter * leftPlotter_
Definition: plot_gaps.h:134
GapQueuePlotter * rightPlotter_
Definition: plot_gaps.h:135
DLR_TS::PlotLab::AFigureStub * figure_
Definition: plot_gaps.h:132
PlotGaps(std::string prefix)
Definition: plot_gaps.h:139
~PlotGaps()
Definition: plot_gaps.h:151
virtual TVehicleMotionStateReader * getVehicleMotionStateReader()=0
static adore::env::AFactory * get()
Definition: afactory.h:236
Definition: com_patterns.h:68
virtual void getData(T &value)=0
virtual bool hasUpdate() const =0
std::vector< GapData > GapQueue
Definition: gapdata.h:53
interval< T > cos(interval< T > x)
Definition: intervalarithmetic.h:225
T min(T a, T b, T c, T d)
Definition: adoremath.h:663
interval< T > sin(interval< T > x)
Definition: intervalarithmetic.h:204
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
x
Definition: adore_set_goal.py:30
g
Definition: adore_set_goal.py:29
Definition: areaofeffectconverter.h:20
This struct holds the motion state of the vehicle in 9d.
Definition: vehiclemotionstate9d.h:39