Skip to content

Conversation

@mfogelson
Copy link
Collaborator

Updated code and documentation for Defining an Environment example.

This included adding necessary packages, defining variables and consistent variable names.

Now ant environment example works by blindly copy and pasting all lines to new julia script.

The visualization was causing the following:
ERROR: LoadError: UndefVarError: Visualizer not defined

I moved it to after the dependencies are loaded
Added the DojoEnvironments.visualize.

I don't think that visualize is exported from DojoEnvironments and was causing errors.
The P gain and the simulation time needed to be increased to match the desired performance. 

NOTE: 
```
storage = simulate!(mechanism, 20.0, controller!,
    record=true,
    verbose=true);
```
This outputs NAN values for mu
Added necessary packages, fixed variable name mismatches, and other small bug fixes for a working example.
@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2022

Codecov Report

Merging #60 (f08c819) into main (2b98c76) will decrease coverage by 39.55%.
The diff coverage is n/a.

❗ Current head f08c819 differs from pull request most recent head ea0952f. Consider uploading reports for the commit ea0952f to get more accurate results

@@             Coverage Diff             @@
##             main      #60       +/-   ##
===========================================
- Coverage   87.67%   48.12%   -39.56%     
===========================================
  Files          94       94               
  Lines        4966     4958        -8     
===========================================
- Hits         4354     2386     -1968     
- Misses        612     2572     +1960     
Impacted Files Coverage Δ
src/solver/options.jl 0.00% <0.00%> (-100.00%) ⬇️
src/contacts/linear.jl 0.00% <0.00%> (-100.00%) ⬇️
src/mechanics/energy.jl 0.00% <0.00%> (-100.00%) ⬇️
src/mechanics/momentum.jl 0.00% <0.00%> (-100.00%) ⬇️
src/graph/linear_system.jl 0.00% <0.00%> (-100.00%) ⬇️
src/simulation/simulate.jl 0.00% <0.00%> (-100.00%) ⬇️
src/contacts/collisions/string.jl 0.00% <0.00%> (-100.00%) ⬇️
src/joints/rotational/impulses.jl 0.00% <0.00%> (-100.00%) ⬇️
src/gradients/finite_difference.jl 0.00% <0.00%> (-100.00%) ⬇️
src/joints/translational/impulses.jl 0.00% <0.00%> (-100.00%) ⬇️
... and 58 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b98c76...ea0952f. Read the comment docs.

For this example we need the following setup:
```julia
using Pkg
Pkg.activate(joinpath(@__DIR__, ".."))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should not be necessary, and if they are we need to fix those.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct it was not necessary. I will remove that.

addressing comment from pull request
@janbruedigam janbruedigam merged commit 431068d into dojo-sim:main Nov 23, 2022
@mfogelson mfogelson deleted the mfogelson-patch-defining-env branch June 20, 2024 22:01
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.

4 participants