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

Add map visualization capabilities #16

Open
charlesvdv opened this issue May 13, 2020 · 2 comments · Fixed by #27
Open

Add map visualization capabilities #16

charlesvdv opened this issue May 13, 2020 · 2 comments · Fixed by #27
Assignees

Comments

@charlesvdv
Copy link
Owner

Adding visualization capabilities to the map creation and the path planning are critical for multiple reasons:

  • Ease the debugging by seeing what the algorithm does
  • Provide feedback on possible optimizations
  • Map configuration tuning
  • ...

I have never done 2D drawing in C++ so I don't have any strong preferences for a library. I am just wondering if a format like SVG would not be better compared to more opaque format like JPEG or PNG. It would allow us more flexibility if we want more fancy tooling around the map visualization/analysis. Also, the library capabilities needs to be versatile enough to be able to compose multiple "layers" of drawing. For example, drawing a path on top of mesh.

It also needs to be embedded with CMake FetchContent functionality if possible.
For a code design perspective, I would like to have the drawing/visualization capabilities as decoupled as possible from the Map abstraction. The best would be to have separate class(es) doing the drawing.

More concretely, I see at least 3 visualizations needed:

  • The quadtree map
    • The output should look like something like this (but without the points)
    • Color zone marked as obstacle
    • Might be nice to have a scale or a graduated axis to check if the position of the obstacles
  • The mesh
  • The path on top of the mesh
@charlesvdv
Copy link
Owner Author

Right now, only a rough implementation of the quadtree map can be found on this branch. The mesh and path are not yet implemented.

But with the quadtree implementation and the rough map implementation, you should be able to have ideas on how you will implement the visualization as well as picking a good 2D drawing library that fits our needs.

@JonathanPetit
Copy link
Collaborator

JonathanPetit commented May 14, 2020

The steps to create visualization lib:

  • Basic structure
  • Add basics geometries (Line, Circle, Rectangle)
  • Add complexes geometries (Path, Polygone, Polyline)
  • Add css style capacity
  • Add a full example

The steps to create the SVG map are:

  • Global map
  • Add obstacles and quadtree
  • Add mesh
  • Add motion planning
  • Add colors and others stuffs to have nice visual.

Each step will be a layer of SVG and will be a separate class.

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 a pull request may close this issue.

2 participants