Skip to content

Commit

Permalink
Add an example to README
Browse files Browse the repository at this point in the history
Signed-off-by: Kunlin Yu <yukunlin@syriusrobotics.com>
  • Loading branch information
kunlinyu committed Dec 26, 2023
1 parent 6c4b3e4 commit 09dd35b
Showing 1 changed file with 202 additions and 0 deletions.
202 changes: 202 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,205 @@ conan install . --output-folder=out/build --build=missing
```
5. Finally trigger configuration and building using VS GUI.

# example
```json
{
"connections": [
{
"comment": "this is a inter layer connection connect layer1 and layer2",
"layers": [
"layer1",
"layer2"
],
"nodes": [
"n1",
"node_2nd"
],
"spaces": [
"space1",
"space_2nd"
]
}
],
"layers": [
{
"id": "layer1",
"theme": "Topographic",
"dual_space": {
"edges": [
{
"boundary": "b2",
"geom": "LINESTRING (0.5 0.5, 1.5 0.5)",
"id": "e",
"nodes": [
"n1",
"n2"
],
"weight": 0.0
}
],
"nodes": [
{
"edges": [
"e"
],
"geom": "POINT (0.5 0.5)",
"id": "n1",
"space": "space1"
},
{
"edges": [
"e"
],
"geom": "POINT (1.5 0.5)",
"id": "n2",
"space": "space2"
}
]
},
"primal_space": {
"boundaries": [
{
"edge": null,
"geom": "LINESTRING (0 0, 1 0)",
"id": "b1",
"spaces": [
"space1"
]
},
{
"edge": "e",
"geom": "LINESTRING (1 0, 1 1)",
"id": "b2",
"spaces": [
"space1",
"space2"
]
},
{
"edge": null,
"geom": "LINESTRING (1 1, 0 1)",
"id": "b3",
"spaces": [
"space1"
]
},
{
"edge": null,
"geom": "LINESTRING (0 1, 0 0)",
"id": "b4",
"spaces": [
"space1"
]
},
{
"edge": null,
"geom": "LINESTRING (1 0, 2 0)",
"id": "b5",
"spaces": [
"space2"
]
},
{
"edge": null,
"geom": "LINESTRING (2 0, 2 1)",
"id": "b6",
"spaces": [
"space2"
]
},
{
"edge": null,
"geom": "LINESTRING (2 1, 1 1)",
"id": "b7",
"spaces": [
"space2"
]
}
],
"spaces": [
{
"boundaries": [
"b1",
"b2",
"b3",
"b4"
],
"geom": "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))",
"id": "space1",
"node": "n1"
},
{
"boundaries": [
"b2",
"b5",
"b6",
"b7"
],
"geom": "POLYGON ((1 0, 2 0, 2 1, 1 1, 1 0))",
"id": "space2",
"node": "n2"
},
{
"boundaries": [],
"geom": "POLYGON ((-1 0, 0 0, 0 1, -1 1, -1 0))",
"id": "space_2nd",
"node": null
}
]
}
},
{
"id": "layer2",
"theme": "Topographic",
"dual_space": {
"edges": [],
"nodes": [
{
"edges": [],
"geom": "POINT (-0.5 0.5)",
"id": "node_2nd",
"space": null
}
]
},
"primal_space": {
"boundaries": [
{
"edge": null,
"geom": "LINESTRING (-1 0, 0 0)",
"id": "b_2nd1",
"spaces": []
},
{
"edge": null,
"geom": "LINESTRING (0 0, 0 1)",
"id": "b_2nd2",
"spaces": []
},
{
"edge": null,
"geom": "LINESTRING (0 1, -1 1)",
"id": "b_2nd3",
"spaces": []
},
{
"edge": null,
"geom": "LINESTRING (-1 1, -1 0)",
"id": "b_2nd4",
"spaces": []
}
],
"spaces": [
{
"boundaries": [],
"geom": "POLYGON ((-1 0, 0 0, 0 1, -1 1, -1 0))",
"id": "space_2nd",
"node": null
}
]
}
}
]
}
```

0 comments on commit 09dd35b

Please sign in to comment.