diff --git a/examples/example02.py b/examples/example02.py index 16261e5..64ff761 100644 --- a/examples/example02.py +++ b/examples/example02.py @@ -3,16 +3,16 @@ """ import pysocialforce as pysf -obstacle01 = pysf.map_config.Obstacle( +obstacle01 = pysf.Obstacle( [(10, 10), (15,10), (15, 15), (10, 15)]) -obstacle02 = pysf.map_config.Obstacle( +obstacle02 = pysf.Obstacle( [(20, 10), (25,10), (25, 15), (20, 15)]) -route01 = pysf.map_config.GlobalRoute( +route01 = pysf.GlobalRoute( [(0, 0), (10, 10), (20, 10), (30, 0)]) crowded_zone01 = ((10, 10), (20, 10), (20, 20)) -map_def = pysf.map_config.MapDefinition( +map_def = pysf.MapDefinition( obstacles=[obstacle01, obstacle02], routes=[route01], crowded_zones=[crowded_zone01]) diff --git a/examples/example03.py b/examples/example03.py index 6599937..a76cb86 100644 --- a/examples/example03.py +++ b/examples/example03.py @@ -4,16 +4,16 @@ import pysocialforce as pysf import numpy as np -obstacle01 = pysf.map_config.Obstacle( +obstacle01 = pysf.Obstacle( [(10, 10), (15,10), (15, 15), (10, 15)]) -obstacle02 = pysf.map_config.Obstacle( +obstacle02 = pysf.Obstacle( [(20, 10), (25,10), (25, 15), (20, 15)]) -route01 = pysf.map_config.GlobalRoute( +route01 = pysf.GlobalRoute( [(0, 0), (10, 10), (20, 10), (30, 0)]) crowded_zone01 = ((10, 10), (20, 10), (20, 20)) -map_def = pysf.map_config.MapDefinition( +map_def = pysf.MapDefinition( obstacles=[obstacle01, obstacle02], routes=[route01], crowded_zones=[crowded_zone01]) @@ -30,7 +30,7 @@ np.expand_dims(ped_pos, axis=1), np.expand_dims(ped_pos + ped_vel, axis=1) ), axis=1) - state = pysf.sim_view.VisualizableSimState(step, ped_pos, actions) + state = pysf.VisualizableSimState(step, ped_pos, actions) sim_view.render(state, fps=10) sim_view.exit() diff --git a/pysocialforce/__init__.py b/pysocialforce/__init__.py index 392094c..328e324 100644 --- a/pysocialforce/__init__.py +++ b/pysocialforce/__init__.py @@ -1,8 +1,17 @@ """Numpy implementation of the Social Force model.""" -__version__ = "1.1.2" +__version__ = "2.0.0" -from .logging import * +from .logging import logger +from .config import \ + SimulatorConfig, DesiredForceConfig, GroupCoherenceForceConfig, \ + GroupGazeForceConfig, GroupReplusiveForceConfig, ObstacleForceConfig, \ + PedSpawnConfig, SceneConfig, SocialForceConfig from .simulator import Simulator, Simulator_v2 -from .forces import * +from .forces import \ + Force, DebuggableForce, DesiredForce, GroupCoherenceForceAlt, \ + GroupGazeForceAlt, GroupRepulsiveForce, ObstacleForce, SocialForce from .sim_view import SimulationView, VisualizableSimState +from .map_config import \ + Circle, Line2D, Rect, Zone, Vec2D, \ + GlobalRoute, Obstacle, MapDefinition