Skip to content

Commit

Permalink
clean up examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanparys committed Dec 13, 2016
1 parent 1b6c3e3 commit f541551
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions examples/p2p_dubins.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
vehicle.plot('state', knots=True, labels=['x (m)', 'y (m)', 'theta (rad)'])

if vehicle.options['substitution']:
vehicle.plot('err_pos', knots=True)
vehicle.plot('err_dpos', knots=True)
vehicle.plot('err_pos', knots=True)
vehicle.plot('err_dpos', knots=True)

# run it!
simulator.run()
9 changes: 4 additions & 5 deletions examples/p2p_holonomic_balls.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from omgtools import *

# create vehicle
## Holonomic
vehicle = Holonomic(shapes=Circle(0.2), options={'syslimit': 'norm_2'})
vehicle.define_knots(knot_intervals=10)

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

environment.add_obstacle(Obstacle({'position': [0.,-0.5]}, shape=Circle(0.75),
simulation={'trajectories': trajectories1}))
simulation={'trajectories': trajectories1}))
environment.add_obstacle(Obstacle({'position': [2.,0.5]}, shape=Circle(0.75)))
environment.add_obstacle(Obstacle({'position': [-2.,0.5]}, shape=Circle(0.75)))

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

# create a point-to-point problem
problem = Point2point(vehicle, environment, freeT=True)
problem.set_options({'solver_options': {'ipopt': {'ipopt.linear_solver': 'ma57',
'ipopt.hessian_approximation': 'exact'}}})
problem.set_options({'solver_options': {'ipopt': {'ipopt.linear_solver': 'ma57',
'ipopt.hessian_approximation': 'exact'}}})
problem.init()

# create simulator
Expand Down
2 changes: 0 additions & 2 deletions examples/p2p_holonomic_blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,3 @@

# run it!
simulator.run()

# problem.save_movie('scene', number_of_frames=60, name='warehouse', axis=False)
3 changes: 0 additions & 3 deletions examples/p2p_holonomic_multiproblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,3 @@
simulator.set_problem(problem2)
vehicle.set_terminal_conditions([0.0, 1.0])
simulator.run()

# plot movie
# problem2.plot_movie('scene', number_of_frames=100, repeat=False)

0 comments on commit f541551

Please sign in to comment.