@@ -39,6 +39,8 @@ const vector<pair<string, Param::Type>> Vertex::allowed_params
39
39
{ " is_holding_point" , Param::Type::BOOL },
40
40
{ " is_passthrough_point" , Param::Type::BOOL },
41
41
{ " human_goal_set_name" , Param::Type::STRING },
42
+ { " mutex" , Param::Type::STRING },
43
+ { " merge_radius" , Param::Type::DOUBLE },
42
44
};
43
45
44
46
@@ -131,6 +133,7 @@ YAML::Node Vertex::to_yaml(const CoordinateSystem& coordinate_system) const
131
133
void Vertex::draw (
132
134
QGraphicsScene* scene,
133
135
const double radius,
136
+ const double drawing_meters_per_pixel,
134
137
const QFont& font,
135
138
const CoordinateSystem& coordinate_system) const
136
139
{
@@ -163,6 +166,19 @@ void Vertex::draw(
163
166
const double icon_ring_radius = radius * 2.5 ;
164
167
const double icon_scale = 2.0 * radius / 128.0 ;
165
168
169
+ if (const auto r_merge_opt = merge_radius ())
170
+ {
171
+ const double r_merge = *r_merge_opt / drawing_meters_per_pixel;
172
+ const QPen radius_pen (selected ? selected_color : Qt::black);
173
+ auto * radius_item = scene->addEllipse (
174
+ x - r_merge,
175
+ y - r_merge,
176
+ 2 * r_merge,
177
+ 2 * r_merge,
178
+ radius_pen);
179
+ radius_item->setZValue (19.0 );
180
+ }
181
+
166
182
if (is_holding_point ())
167
183
{
168
184
const double icon_bearing = -135.0 * M_PI / 180.0 ;
@@ -342,6 +358,15 @@ bool Vertex::is_charger() const
342
358
return it->second .value_bool ;
343
359
}
344
360
361
+ std::optional<double > Vertex::merge_radius () const
362
+ {
363
+ const auto it = params.find (" merge_radius" );
364
+ if (it == params.end ())
365
+ return std::nullopt;
366
+
367
+ return it->second .value_double ;
368
+ }
369
+
345
370
bool Vertex::is_cleaning_zone () const
346
371
{
347
372
const auto it = params.find (" is_cleaning_zone" );
0 commit comments