generated from athackst/vscode_ros2_workspace
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create Fluid Generator class #304
Closed
DFriend01 opened this issue
May 3, 2023
· 0 comments
· Fixed by #328 · May be fixed by UBCSailbot/boat_simulator#79
Closed
Create Fluid Generator class #304
DFriend01 opened this issue
May 3, 2023
· 0 comments
· Fixed by #328 · May be fixed by UBCSailbot/boat_simulator#79
Labels
Comments
eomielan
changed the title
Create Fluid Simulation classes
Create Fluid Simulation class
Feb 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Purpose
To implement the Python class that perform the fluid simulation for wind and current. See this confluence page for more details.
Description
Refer to the
FluidGenerator
class, found inboat_simulator/nodes/physics_engine/fluid_generation.py
, which you will use to implement this issue.The class named
FluidGenerator
has the following properties:generator
is the random number generator used to generate the fluid velocity. Take a look at theVectorGenerator
andMVGaussianGenerator
generator classes inboat_simulator/common/generators.py
.velocity
is a 2D numpy array representing the fluid velocity.FluidGenerator
is a constructor that accepts the random number generator as an argument.next
is a function that accepts no arguments and updates the fluid simulator by generating the next velocity vector.velocity
is a property function that returns the most recently generated velocity vector.speed
is a property function that returns the fluid's speed derived from the velocity (magnitude).direction
is a property function that returns the direction of the fluid velocity, following the[-180, 180)
convention. Use thebound_to_180
function fromboat_simulator/common/utils.py
.Tests
Add your unit tests to
tests/unit/nodes/physics_engine/
. You will use the pytest API for testing, which is already installed.Once complete, make a pull request to the main branch.
Resources
The text was updated successfully, but these errors were encountered: