Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/graph names and widths #384

Merged
merged 4 commits into from
Sep 1, 2021
Merged

Conversation

codebot
Copy link
Contributor

@codebot codebot commented Aug 31, 2021

Top-level graph parameters in YAML

Working towards #378 , this PR provides a new graphs top-level dict in the YAML files. Entries in this dict can map graphs (currently only identified by their integer ID) to human-readable names. Graphs can also have a default lane width, to avoid having to set lane width on each individual lane segment. This graphs top-level dict is optional; there will be no change when viewing or saving existing files. Adding GUI widgets to add or edit these parameters will come in a subsequent PR; for now, you can hand-edit the YAML.

Better font scaling for vertex names

Previously, vertex names were rendered with a hard-coded font size. This made them seem too-small or too-large depending on the map scale. The Level::draw() function now computes a reasonable font size and reuses it for each Vertex::draw() call; previously it was creating a hard-coded font and throwing it away after rendering each vertex, which was slow when rendering very large maps.

Define a data structure in the YAML files to save parameters about
graphs, such as their default width (currently hard-coded to 1 meter)
as well as their names. This is a first step towards #378 and is also
useful for making traffic lanes for robots other than "typical width"
(larger or smaller) than can fit through common doorways.

Signed-off-by: Morgan Quigley <[email protected]>
Signed-off-by: Morgan Quigley <[email protected]>
@codebot codebot merged commit f4ccf7e into main Sep 1, 2021
@codebot codebot deleted the feature/graph_names_and_widths branch September 1, 2021 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants