Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
Move most TODO items into dedicated document to reduce noise. Link to Wiki,
where I've added some screenshots.
  • Loading branch information
garfieldnate committed Aug 6, 2024
1 parent 605cc2e commit ffeac65
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 136 deletions.
153 changes: 18 additions & 135 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,148 +1,31 @@
# SVS Viewer

A JavaFX-based rewrite of the SVS viewer.
This is a 3D explorer for [Soar's](https://soar.eecs.umich.edu/) Spatial Visual System.
It is a JavaFX-based rewrite of Joseph Xu's `svs_viewer`. The application is built as an installer
for all major platforms, so clients do not need to worry about Java configuration.

## Terminology
This application was put together rather quickly, and I was learning JavaFX in the process. I've tested
it on am M2 MacOS, but it still needs to be tested on other platforms.

Scene in SVS vs JavaFX
Geometry in SVS (might not be visible, has color, text, etc.)
To learn more about Soar's Spatial Visual System, see the Soar Manual chapter
here: https://soar.eecs.umich.edu/soar_manual/08_SpatialVisualSystem/.

## Features

* 3D rendering of SVS scenes
* Mouse-based scene rotation and keyboard-based camera controls
* toggleable drawing modes (fill, line, or both)
* toggleable 3D axes display
* toggleable label display
* screenshot saving

Screenshots are available on the [wiki](https://github.com/garfieldnate/JavaSVSViewer/wiki).

## Installing

* Standalone applications built via jpackage in CI
* For Mac, I notice that the .pkg works but the .dmg does not

## Progress

NEXT: prioritize features likely needed for preview release

- add instructions and some screenshots to readme

## Bugs

- on Mac: click on menu, don't select anything and click on pane. Registers as a mouse drag and rotates the scene!

### Design

[X] Hello World
[X] Place display logic into an XML pane thingy
[ ] JMetro? https://www.pixelduke.com/java-javafx-theme-jmetro/

### Network

Real line processor parses and sends results to UI
Test one just saves lines

Perhaps a Java-style pull architecture? UI updater is pulling from command parser, (which is pulling from line
provider?), which is pulling from Server?

[X] listen on specified port
[X] figure out how to update UI in some way

- [X] JavaFX Service (or possibly Task, Worker)
[X] receive SVS commands (POC: just print them out)
[X] add wildcard-trie to GeometryManager so we can retrieve scenes/geometries using wildcards.
[ ] interpret parsed commands
- [X] update geometry
- [X] spike: show a correct box
- [ ] layer
- [X] new scene
- [X] new geometry
- [X] delete scenes
- [X] delete geometries
- [X] save
- [ ] inject Socket?
- [ ] what is controller actually supposed to do?
- [ ] can I really not specify default port in the FXML? Maybe has to be somewhere else? Is DI not possible? Do I not
understand FXML well enough?
[ ] connect/disconnect occur gracefully
- currently doesn't allow reconnecting at all
[ ] graceful error when port is already in use

[ ] testing

- [ ] add an echo mode to server that returns parsed JSON or something
- [ ] instantiate real server and test client
- [ ] turn on echo mode, then send example data to server with test client and expect back proper acknowledgements and
JSONs
[ ] log received commands
- [ ] console
- [ ] a Window user can open?
- [ ] https://github.com/TestFX/TestFX

### 3D Display

[X] meshes from SVS
[X] spheres from SVS
[X] labels from SVS
[%] grid lines

- change grid size automatically when shapeGroup size changes

### List Display

[ ] show all objects
[ ] search objects by name
[ ] change color of selected objects (search for belief-* and make them all red)
[ ] reset color changes

### Controls

[ ] good default camera position
[ ] shortcuts for different angle views
[X] zoom in/out
[X] translate camera
[X] rotate camera
[ ] rotate around point?
[X] labels on/off
[X] drawing mode line/solid
[X] screenshot shortcut
[ ] select which scene (S1, S2, etc.) to display
[ ] select port to listen on, then create server (also allow command line specification)
[ ] shift+mouse-drag horizontal to rotate around z-axis
[ ] select object with mouse or in objects list panel

- [ ] highlight it somehow
- [ ] show orientation with arrows
- [ ] show its info in a separate panel
- [ ] might be able to inspect geometries that have no visualization (only position, rotation, no vertices)
- [ ] double-click or something to focus camera on object?
- [ ] notify if object not currently visible (completely obstructed or surrounded)?
ideas:
- [ ] change camera to FPV from object? (would probably suffice to show viewing direction of robot)

[ ] 1,2,3,4,5,6 shortcuts to view from different faces
[ ] maybe shift 1,2,3,4,5,6,7,8 to view from different corners
[ ] arrow keys move camera to sides
[X] mouse rotation
[ ] regex to show/hide certain labels or objects

[ ] visual camera controls?

- slider for zoom https://www.youtube.com/watch?v=yWsNO9qiYgg
- cube thing for rotation?
- minimap for translation?

other:

- [ ] change package name. I am not associated with UMich.
- [ ] rename to SVSViewerFX (for standalone apps, noone needs to know it's Java!)
- [ ] send a PR to improve JavaFX javadocs
- TriangleMesh
- needs to explain texture coordinates
- needs an example for point, texture, and normal data setting
- needs to explain when to use normals and when not to
- validation of faces array needs to be more specific
- fix typos
- add getPointElementSize(), getTexCoordElementSize(), etc. in warnings where printed literally
- Rotate
- does the rotation axis need to be normalized?

### Settings

[X] save/load settings on user's machine somewhere
[ ] adjust sensitivity of controls (zoom)

## Format

We use [google-java-format](https://github.com/google/google-java-format) to format the source files.
Expand Down
123 changes: 123 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
## Bugs

- on Mac: click on menu, don't select anything and click on pane. Registers as a mouse drag and rotates the scene!

### Design

[X] Hello World
[X] Place display logic into an XML pane thingy
[ ] JMetro? https://www.pixelduke.com/java-javafx-theme-jmetro/

### Network

Real line processor parses and sends results to UI
Test one just saves lines

Perhaps a Java-style pull architecture? UI updater is pulling from command parser, (which is pulling from line
provider?), which is pulling from Server?

[X] listen on specified port
[X] figure out how to update UI in some way

- [X] JavaFX Service (or possibly Task, Worker)
[X] receive SVS commands (POC: just print them out)
[X] add wildcard-trie to GeometryManager so we can retrieve scenes/geometries using wildcards.
[ ] interpret parsed commands
- [X] update geometry
- [X] spike: show a correct box
- [ ] layer
- [X] new scene
- [X] new geometry
- [X] delete scenes
- [X] delete geometries
- [X] save
- [ ] inject Socket?
- [ ] what is controller actually supposed to do?
- [ ] can I really not specify default port in the FXML? Maybe has to be somewhere else? Is DI not possible? Do I not
understand FXML well enough?
[X] connect/disconnect occur gracefully
[ ] graceful error when port is already in use

[ ] testing

- [ ] add an echo mode to server that returns parsed JSON or something
- [ ] instantiate real server and test client
- [ ] turn on echo mode, then send example data to server with test client and expect back proper acknowledgements and
JSONs
[ ] log received commands
- [ ] console
- [ ] a Window user can open?
- [ ] https://github.com/TestFX/TestFX

### 3D Display

[X] meshes from SVS
[X] spheres from SVS
[X] labels from SVS
[%] grid lines

- change grid size automatically when shapeGroup size changes

### List Display

[ ] show all objects
[ ] search objects by name
[ ] change color of selected objects (search for belief-* and make them all red)
[ ] reset color changes

### Controls

[ ] good default camera position
[ ] shortcuts for different angle views
[X] zoom in/out
[X] translate camera
[X] rotate camera
[ ] rotate around point?
[X] labels on/off
[X] drawing mode line/solid
[X] screenshot shortcut
[ ] select which scene (S1, S2, etc.) to display
[ ] select port to listen on, then create server (also allow command line specification)
[ ] shift+mouse-drag horizontal to rotate around z-axis
[ ] select object with mouse or in objects list panel

- [ ] highlight it somehow
- [ ] show orientation with arrows
- [ ] show its info in a separate panel
- [ ] might be able to inspect geometries that have no visualization (only position, rotation, no vertices)
- [ ] double-click or something to focus camera on object?
- [ ] notify if object not currently visible (completely obstructed or surrounded)?
ideas:
- [ ] change camera to FPV from object? (would probably suffice to show viewing direction of robot)

[ ] 1,2,3,4,5,6 shortcuts to view from different faces
[ ] maybe shift 1,2,3,4,5,6,7,8 to view from different corners
[ ] arrow keys move camera to sides
[X] mouse rotation
[ ] regex to show/hide certain labels or objects

[ ] visual camera controls?

- slider for zoom https://www.youtube.com/watch?v=yWsNO9qiYgg
- cube thing for rotation?
- minimap for translation?

other:

- [ ] change package name. I am not associated with UMich.
- [ ] rename to SVSViewerFX (for standalone apps, noone needs to know it's Java!)
- [ ] send a PR to improve JavaFX javadocs
- TriangleMesh
- needs to explain texture coordinates
- needs an example for point, texture, and normal data setting
- needs to explain when to use normals and when not to
- validation of faces array needs to be more specific
- fix typos
- add getPointElementSize(), getTexCoordElementSize(), etc. in warnings where printed literally
- Rotate
- does the rotation axis need to be normalized?

### Settings

[X] save/load settings on user's machine somewhere
[ ] adjust sensitivity of controls (zoom)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public ViewerPreferences() {
showLabels = new SimpleBooleanProperty(prefs.getBoolean("showLabels", true));
showLabels.addListener(
(obs, wasPreviouslyVisible, isNowVisible) -> {
System.out.println("Pref set: " + isNowVisible);
prefs.putBoolean("showLabels", isNowVisible);
});

Expand Down

0 comments on commit ffeac65

Please sign in to comment.