Conversation
sample sim using random data... draft 1
DanielRhee
left a comment
There was a problem hiding this comment.
i'm unsure why you aren't using the sims-data codebase for the simulations
| import numpy as np | ||
| import matplotlib.pyplot as plt | ||
|
|
||
| # Veichel state form state.py |
There was a problem hiding this comment.
fyi there's a large update coming to the format of this @goob10000 knows more
There was a problem hiding this comment.
It is already on main if y'all wanna use it
There was a problem hiding this comment.
oh yeah definitely move to it then.
| [18, 10] | ||
| ]) | ||
|
|
||
| # finding velcoity from heading |
There was a problem hiding this comment.
why aren't you using the code in the sims for this?
|
|
||
|
|
||
| ## loading the json file | ||
| with open("/Users/atvyas/Desktop/coding/FS/sim_int/cones.json", "r") as f: |
There was a problem hiding this comment.
use a relative path that works on anyone's computer
| from state_test import ( | ||
| position, speed, heading, |
There was a problem hiding this comment.
very confused why you're importing this instead of an actual vehicle state
| acceleration, throttle, brakes, lastCurrent | ||
| ) | ||
|
|
||
| # sim time set up |
There was a problem hiding this comment.
these shouldn't be necessary if you use the actual sim
There was a problem hiding this comment.
file shouldn't be necessary, use the Sims-Data repo
There was a problem hiding this comment.
@vyasatharv07 are the units in meters? what are the units here
There was a problem hiding this comment.
You can make it a json5 file and use that library to add comments to the json. I did the same for the main sim so the params could have units
| @@ -0,0 +1,56 @@ | |||
| import numpy as np | |||
| import matplotlib.pyplot as plt | |||
| from state_test import ( | |||
There was a problem hiding this comment.
Similar to Daniel's comment, if you use Sims-Data you should be able to import * from ParamLoader and that will have all the parameters and the references to build an array and schema for your state array
There was a problem hiding this comment.
We can chat more about how it works if you want
this should be going to dev but it's broken and i'll fix it later idk