Skip to content

Commit f541551

Browse files
committed
clean up examples
1 parent 1b6c3e3 commit f541551

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

examples/p2p_dubins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
vehicle.plot('state', knots=True, labels=['x (m)', 'y (m)', 'theta (rad)'])
5353

5454
if vehicle.options['substitution']:
55-
vehicle.plot('err_pos', knots=True)
56-
vehicle.plot('err_dpos', knots=True)
55+
vehicle.plot('err_pos', knots=True)
56+
vehicle.plot('err_dpos', knots=True)
5757

5858
# run it!
5959
simulator.run()

examples/p2p_holonomic_balls.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from omgtools import *
2121

2222
# create vehicle
23-
## Holonomic
2423
vehicle = Holonomic(shapes=Circle(0.2), options={'syslimit': 'norm_2'})
2524
vehicle.define_knots(knot_intervals=10)
2625

@@ -36,17 +35,17 @@
3635
'values': [[0., 0.0], [0., 0.25]]}}
3736

3837
environment.add_obstacle(Obstacle({'position': [0.,-0.5]}, shape=Circle(0.75),
39-
simulation={'trajectories': trajectories1}))
38+
simulation={'trajectories': trajectories1}))
4039
environment.add_obstacle(Obstacle({'position': [2.,0.5]}, shape=Circle(0.75)))
4140
environment.add_obstacle(Obstacle({'position': [-2.,0.5]}, shape=Circle(0.75)))
4241

4342
environment.add_obstacle(Obstacle({'position': [0.,-2.25]}, shape=Circle(0.75),
44-
simulation={'trajectories': trajectories2}))
43+
simulation={'trajectories': trajectories2}))
4544

4645
# create a point-to-point problem
4746
problem = Point2point(vehicle, environment, freeT=True)
48-
problem.set_options({'solver_options': {'ipopt': {'ipopt.linear_solver': 'ma57',
49-
'ipopt.hessian_approximation': 'exact'}}})
47+
problem.set_options({'solver_options': {'ipopt': {'ipopt.linear_solver': 'ma57',
48+
'ipopt.hessian_approximation': 'exact'}}})
5049
problem.init()
5150

5251
# create simulator

examples/p2p_holonomic_blocking.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,3 @@
6565

6666
# run it!
6767
simulator.run()
68-
69-
# problem.save_movie('scene', number_of_frames=60, name='warehouse', axis=False)

examples/p2p_holonomic_multiproblem.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,3 @@
6060
simulator.set_problem(problem2)
6161
vehicle.set_terminal_conditions([0.0, 1.0])
6262
simulator.run()
63-
64-
# plot movie
65-
# problem2.plot_movie('scene', number_of_frames=100, repeat=False)

0 commit comments

Comments
 (0)