Giter VIP home page Giter VIP logo

falcon-9-simulation's Introduction

Hi! I'm a software engineer, interested in how software can be used to improve thought processes.


๐ŸŒ lewisbowes.com

falcon-9-simulation's People

Contributors

lbowes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

falcon-9-simulation's Issues

feature/second-cube

Depends on #51

Description

The final app will contain multiple simulated ridid bodies. For milestone 1, one more independent cube mesh should be added to the sim and visualisation.

TODO

  • Add one more Mesh instance to the visualisation
  • Create a new cube in the Simulation
  • The serialised output data for this cube should be nested in a new JSON object at the same level as the first, as if they were 2 components of one parent entity

feature/imgui-style

Description

The ImGui style should be updated.

TODO

Create a function setImGuiStyle in Visualisation that completely initialises ImGui with a custom style.

  • Use Ubuntu Mono font
  • Change colour scheme

bug/fast-diagonal-movement

Description

The FreeCamera moves faster diagonally than it does along a single direction.

TODO

Normalise the movement vector before using it to update the camera's position.

feature/camera-post-processing

Description:

Apply lens distortion effects to the main camera. Distortion parameters will change between cameras.

TODO:

Render:

  • the currently bound camera's view to a texture
  • a quad that fills the screen with a solid colour
  • the camera's texture to the quad (no modification)
  • the camera's texture to the quad but with a fisheye distortion effect

test/camera-system

Description

Write requirements tests for Cameras module.

TODO

  • If no cameras are registered, then the default camera should be active
  • The default camera should be positioned at [0,0,0]
  • If a camera is successfully registered registerCam should return true
  • If a camera is registered with an already existing name, registerCam should return false (and do nothing)
  • If the user attempts to bind a camera that hasn't been registered, bind should return false (and do nothing)
  • binding a camera correctly updates the active camera's position with that of the bound camera

fix/fpv-camera-input

Description

There are a few issues with the way user input is being handled around the FPVCamera.

TODO

  • The application should start with the FPVCamera already bound (for now)
  • Other cameras should not be able to capture mouse focus (with no control, this would do nothing but hide the cursor)
  • The FPVCamera should not receive any input when it does not have focus

fix/imgui-input-fpv-cam

Description

When the FPVCamera is active and the mouse cursor is hidden, ImGui input should be disabled (at the moment it is still possible to interact with ImGui components with an invisible cursor).

TODO

Fix the bug above

feature/static-camera

Description

The visualisation should have a static camera in some fixed position/orientation in the scene (in addition to the FPVCamera). Eventually it will have more, but there should be at least two cameras to begin with to allow development of #6.

TODO

  • Add a new static camera to the application and register it with the Cameras module
  • The camera should face the scene origin

feature/obj-model-rendering

Description

It should be possible to load a basic obj model file using tinyobjloader. This model represents an instance of static geometry.

TODO

  • Create an OBJModel class
  • OBJModel(const char* objFilepath);
    constructor takes in a path to a .obj file

This class should have the following public functions:

  • void draw(glm::dvec3 camPos) const;
    for getting the model's data on screen
  • void setTransform(glm::dvec3 position, glm::dquat orientation);
    for updating the world-space transform of this object

feature/cube-mounted-cam

Description

The visualisation should contain cameras that are attached to coordinate frames and move with them (future drone camera, interstage camera etc)

TODO

  • Create a MountedCamera and register it with the CameraSystem
  • This camera should be fixed on one face of one cube such that the cube is visible in it's FOV
  • This camera should remain fixed to the cube's reference frame as it moves

feature/animation-playback-panel

Description

The visualisation should feature an animation playback panel to allow the user to adjust the time playback configuration of the animation. This system should only be concerned with modifying playback config data (see below).

TODO

  • Create a PlaybackControlPanel class that is given access to a PlaybackConfig instance (not owned)
  • Allow the panel to modify the components of the PlaybackConfig

Add the following components to the panel:

  • Time slider
  • Pause/resume buttons
  • Speed modifier buttons
  • Jump forward/back buttons

feature/camera-select-panel

Depends on #9

Description

It should be possible to select different named cameras in the visualisation.

TODO

  • Add a CameraSettings panel
  • Add a drop-down list of camera names registered with the Cameras module (selecting any will bind that camera to the current view)

fix/camera-initialisation

Description

When the visualisation is initialised, the camera jumps to the mouse position.

Steps to reproduce

  1. Place the mouse cursor over the area of the screen where the visualisation application window will open
  2. Open the visualisation application
  3. Move the mouse enough for it to register

feature/debug-overlay

Allow the user to toggle visibility of a debug layer overlay:

  • wireframe collision volumes
  • coordinate frames
  • billboard markers for centre of mass locations, waypoints, camera/light locations
  • trajectory plots
  • settings panel to toggle each of these on/off

fix/physics-simulation

Description

A simulation output file can be correctly parsed and displayed as an animated visualisation. But the physics simulation creating this output is not accurate. Collision hitboxes are wrong and the two cubes come to rest floating above the floor.

TODO

  • Change the configuration of Simulation such that the output is realistic

feature/save-load

Description

The state of the visualisation should be saved and loaded.

TODO

  • FPVCamera should be saved and loaded between runs
  • PlaybackConfig should be saved and loaded between runs

feature/draw-state-snapshot

Description

A StateSnapshot should contain all information needed to render the system. The Scene should be responsible for loading/destroying resources it uses (e.g OBJModels) and should manage model transform updates using information from the CameraSystem.

Input
A StateSnapshot

Output
Fully rendered scene after call to draw()

TODO

  • Add an updateState function to the Scenes public interface to set the transforms of meshes it owns based on information in the StateSnapshot
  • Add a (private) drawState function to the Scene called by the public draw function to render everything

refactor/scene-class

Description

The Scene class needs to be updated.

TODO

  • remove references to Irrlicht from the code, this library is not being used anymore
  • make this class a singleton
  • add a draw() function, responsible for drawing everything in the scene (floor plane grid, skybox, models)

docs/update-readme

Update the project README

  • better summary
  • include some gifs/webcast screenshots
  • list all 3rd party libraries used so far
  • install instructions
  • usage instructions

refactor/free-functions-to-singletons

Description

Singletons should be used for classes where there should logically only be one instance.

TODO

Convert free-functions + globals in

  • Visualisation
  • Cameras
  • Input

into singleton classes.

feature/scene-skybox

Depends on #14

Description

The Scene should have a skybox.

TODO

  • Initialise all data required for rendering the skybox in the Scene's constructor
  • Add a drawSkybox() function to the Scene class called by the main draw() function. This should be drawn before anything else.

test/fpv-camera

Description

Write requirements tests for the FPVCamera class.

TODO

Test:

  • movement in all 6 directions (forward, back, left, right, up, down)
  • lookAt in all 6 directions ^

refactor/fpv-camera

Description

  • Decouple the FPVCamera's handling of input from its receiving of input
  • Sensitivity and Movement config information can be encapsulated in a better way

TODO

  • rename the handleInput() function to process(Input& input) and have it take in a blob of relevant Input to handle (this a) makes it easier to test this class in #10 and b) separates this class from GLFW). The FPVCamera should not care where its
    input comes from.
  • change Sensitivity and Movement to unnamed structs that are static members of the FPVCamera class

fix/handle-camera-focus

Description

When the FPVCamera has focus, the mouse cursor is hidden and the user has no way to recapture it.

Steps to reproduce

  1. Start the application

TODO

  • If the escape key is pressed, the FPVCamera should return the mouse cursor to the user

feature/unique-cam-aspect-ratios

Depends on #22

Description

CameraBaseState currently contains an aspectRatio member, but this is never used because the aspect ratio used in the view matrix for rendering is always taken from the screen. In future, in combination with #22, the camera should be decoupled from the screen.

TODO

  • The rendering system needs to compare the available space rectangle (imgui window, or full screen etc) with the active camera's aspect ratio. This should be used to position/scale the rendered quad correctly (if aspect ratios differ, there will be black padding)

todo: operationalise this

feature/state-snapshot

Description

A StateSnapshot represents the complete state of the simulation at a single instant in time, containing all information the user is interested in. For milestone 1, this is the positions and orientations of both cubes.

TODO

Create a StateSnapshot class containing:

  • cube 1 position (glm::dvec3)
  • cube 1 orientation (glm::dquat)
  • cube 2 position (glm::dvec3)
  • cube 2 orientation (glm::dquat)

with:

  • a constructor that takes in a json object (one time point in the simulation output) and parses it to correctly initialise all members
  • a static function lerp that allows a user to take in two states and linearly interpolate between them, returning the result

feature/load-state-history

Description

The History class needs to be constructed with output data from the simulation in order to reconstruct a model that can be queried at any point in time. This serves as the bridge between the simulation and visualisation components of the app.

TODO

Provide implementations for:

  • History constructor
  • History::stateAt function

refactor/camera-system

Description

The CameraSystem needs small changes.

TODO

  • Convert static variables to members (the class is a singleton, they don't need to be static)
  • Update setViewTransform to getViewTransform and have it return the transform matrix
  • Have Visualisation call bgfx::setViewTransform() with the matrix returned by the CameraSystem
  • registerCam and bind should return bools depending on whether they succeed or not
  • Add a new public function for getting a list of all registered camera names

feature/history

Depends on #24

Description

A navigable state history needs to be generated from simulation output (output file). Once loaded, the user should be free to move to any time point simulated to view the state of the system.

Serialised state blocks in the output file do not need to be regularly spaced in time and/or have a 1:1 relationship with StateSnapshots in the History. It should be the responsibility of the History class to take in this data and process it to produce frames that can be interpolated.

Input:
One double representing a requested snapshot time (seconds)

Output:
A StateSnapshot containing all relevant information about the system for that instant in time (see #24)

TODO

Make a History class with the following public interface:

  • load : nlohmann::json& -> void
  • getSnapshotAt : double -> StateSnapshot

refactor/chrono-to-glm

Description

The visualisation application should be separate from ProjectChrono. The simulation output file is the interface between the two applications (the user should not have to install all of ProjectChrono just to get the visualisation running, the two are not logically connected).

TODO

Replace all references to the ProjectChrono library with equivalent objects in glm.

feature/separate-sim-and-control

TODO: This issue should be broken down into sub-issues when this feature is implemented. This issue is closer to noting down an idea than specifying work that should be done.

Description

The rocket physics simulation should be a separate program, running as a loopback server for control code to connect to.

TODO

feature/grid-rendering

Depends on #14

Description

The visualisation should have a solid floor plane shown as a grid to provide a constant reference for camera/model positioning/movement.

TODO

  • Initialise all data required for rendering the grid in the Scene's constructor
  • Add a drawGrid() function to the Scene class

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.