Hello, we want to define some polygon area, so robot would walk inside it. Using map editor polygon layer was added, but it’s not being show on the map view. New layer is present as component in configs and displayed in Websight as a part of the map, but only polygons that are shown on the map is for restricted area.
How can i correctly define it for my purpose?
I need to:
- Define polygon which further will be shown in Websight
- Make robot walk around in that area ( Already developed codelet which creates goals inside polygon area )
Another related question - is there any API to get polygon defined in json config from C++ Codelet? I mean from map part in which it’s usually defined, as currently i added param which accepts vector of points.
P.S. i tried to use flatsim demo_1 to check it on map provided with SDK.
"test": {
"color": [
255,
0,
0
],
"execution_queue_limit": 1,
"frame": "world",
"obstacle_max_distance": 1.5,
"obstacle_pixel_size": 0.1,
"polygons": {
"poly8348693694232041": {
"points": [
[
23.400000000000002,
10.100000000000001
],
[
22.700000000000003,
11.4
],
[
23.200000000000003,
12.8
],
[
24.1,
13.700000000000001
],
[
25.1,
13.5
],
[
25.400000000000002,
12.3
],
[
25.3,
10.9
],
[
24.200000000000003,
9.9
],
[
22.5,
11.100000000000001
]
]
}
}
}
{
"name": "test",
"type": "isaac::map::PolygonMapLayer"
}
this 2 blocks were added in config and graph accordingly.