Closed ErikLambrechts closed 6 years ago
Could you maybe give the first part of the printout here?
line 136 to 150 (total # lines is 444963)
108 | 5.2683e-02 | 1.0700e+01
109 | 5.7992e-02 | 1.0800e+01
We reached our target!
Objective: 31.5115
Max update time: 129.116 ms
Av update time: 67.6705 ms
({'a': [array([[ 9.99954274e-01, 9.89954875e-01, 9.79955477e-01, ...,
-1.74971149e-15, -1.76303416e-15, -1.77635684e-15],
[ 9.98212253e-01, 9.85272851e-01, 9.72333450e-01, ...,
1.79412041e-15, 1.78523862e-15, 1.77635684e-15]]), array([[ 9.99954274e-01, 9.89954875e-01, 9.79955477e-01, ...,
-1.74971149e-15, -1.76303416e-15, -1.77635684e-15],
[ 9.98212253e-01, 9.85272851e-01, 9.72333450e-01, ...,
1.79412041e-15, 1.78523862e-15, 1.77635684e-15]]), array([[ 9.99954274e-01, 9.89954875e-01, 9.79955477e-01, ...,
running in python2
gives
>>> problem.save_movie('scene') │ 19 environment.add_obstacle(Obstacle({'position': [ 1.7, -0.5]}, shape=rectangle)) │
Traceback (most recent call last): │ 20 │
File "<stdin>", line 1, in <module> │ 21 # generate trajectory for moving obstacle │
File "/usr/local/lib/python2.7/dist-packages/omgtools/execution/plotlayer.py", line 3│ 22 traj = {'velocity': {'time': [3., 4.], │
87, in save_movie │ 23 'values': [[-0.15, 0.0], [0., 0.15]]}} │
str(scaleonlyaxis).lower()}) │ 24 # add moving obstacle to environment │
File "/usr/local/lib/python2.7/dist-packages/matplotlib2tikz/save.py", line 185, in s│ 25 environment.add_obstacle(Obstacle({'position': [1.5, 0.5]}, shape=Circle(0.4), │
ave │ 26 simulation={'trajectories': traj})) │
code = get_tikz_code(*args, **kwargs) │ 27 │
TypeError: get_tikz_code() got an unexpected keyword argument 'extra'
In the first printout it seems that you are printing vehicle.trajectories or vehicle.signals... Do you also get this printout if you comment the problem.save_movie() line?
For the get_tikz_code() error, what is your matplotlib2tikz version?
@ErikLambrechts omg-tools is only tested (and supported) for python2. The error in save_movie is resolved on the master branch but this version was not yet uploaded to pip. Thanks for remembering us to do this!
example code solves but gives massive print out of np.array's. must be in end of
simulator.run()
or inproblem.save_movie('scene')