Skip to content

Commit

Permalink
Merge pull request #72 from ll7/71-Reduce-requirements-to-the-essenti…
Browse files Browse the repository at this point in the history
…al-ones

Update Python version and refactor dataclass fields with installed packages list
  • Loading branch information
ll7 authored Nov 20, 2024
2 parents ebfcd90 + ff5c795 commit e12681b
Show file tree
Hide file tree
Showing 11 changed files with 327 additions and 311 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For 2. follow the instructions below:

### Local Installation

Install python >= 3.8 and <= 3.12.
Install python >= 3.10 and <= 3.12.

```sh
sudo apt-get update && sudo apt-get install -y python3.12 python3-pip
Expand Down
2 changes: 1 addition & 1 deletion fast-pysf
90 changes: 90 additions & 0 deletions installed_packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
absl-py==2.1.0
ale-py==0.10.1
alembic==1.14.0
annotated-types==0.7.0
astroid==3.3.5
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
cloudpickle==3.1.0
colorlog==6.9.0
contourpy==1.3.1
cycler==0.12.1
dill==0.3.9
docker-pycreds==0.4.0
Farama-Notifications==0.0.4
filelock==3.16.1
fonttools==4.55.0
fsspec==2024.10.0
gitdb==4.0.11
GitPython==3.1.43
grpcio==1.68.0
gym==0.26.2
gym-notices==0.0.8
gymnasium==1.0.0
idna==3.10
iniconfig==2.0.0
isort==5.13.2
Jinja2==3.1.4
kiwisolver==1.4.7
llvmlite==0.43.0
loguru==0.7.2
Mako==1.3.6
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.2
mccabe==0.7.0
mdurl==0.1.2
mpmath==1.3.0
networkx==3.4.2
numba==0.60.0
numpy==1.26.4
opencv-python==4.10.0.84
optuna==4.1.0
packaging==24.2
pandas==2.2.3
pillow==11.0.0
platformdirs==4.3.6
pluggy==1.5.0
protobuf==5.28.3
psutil==6.1.0
pydantic==2.9.2
pydantic_core==2.23.4
pygame==2.6.1
Pygments==2.18.0
pylint==3.3.1
pyparsing==3.2.0
-e git+https://github.com/ll7/pysocialforce-ll7@eebf30ed30893ae5628e3f123439af03de6402e1#egg=PySocialForce&subdirectory=../../fast-pysf
pytest==8.3.3
python-dateutil==2.9.0.post0
pytz==2024.2
PyYAML==6.0.2
requests==2.32.3
rich==13.9.4
-e git+https://github.com/ll7/robot_sf_ll7.git@ebfcd90eae11699941580e2d0237fd6b4e7b5200#egg=robot_sf
scalene==1.5.48
scipy==1.14.1
sentry-sdk==2.18.0
setproctitle==1.3.4
setuptools==75.5.0
Shimmy==2.0.0
six==1.16.0
smmap==5.0.1
SQLAlchemy==2.0.36
stable_baselines3==2.4.0
svgelements==1.9.6
sympy==1.13.1
tensorboard==2.18.0
tensorboard-data-server==0.7.2
tk==0.1.0
toml==0.10.2
tomlkit==0.13.2
torch==2.5.1
tqdm==4.67.0
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
wandb==0.18.7
Werkzeug==3.1.3
wheel==0.45.0
117 changes: 16 additions & 101 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,101 +1,16 @@
absl-py==2.1.0
alembic==1.13.1
appdirs==1.4.4
astroid==3.0.3
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
cloudpickle==3.0.0
colorlog==6.8.2
contourpy==1.2.0
cycler==0.12.1
dill==0.3.8
docker-pycreds==0.4.0
exceptiongroup==1.2.0
Farama-Notifications==0.0.4
filelock==3.13.1
fonttools==4.49.0
fsspec==2024.2.0
gitdb==4.0.11
GitPython==3.1.42
greenlet==3.0.3
grpcio==1.60.1
gym==0.26.2
gym-notices==0.0.8
gymnasium==0.29.1
idna==3.6
iniconfig==2.0.0
isort==5.13.2
Jinja2==3.1.3
kiwisolver==1.4.5
llvmlite==0.42.0
loguru==0.7.2
Mako==1.3.2
Markdown==3.5.2
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.6.1
mccabe==0.7.0
mdurl==0.1.2
mpmath==1.3.0
networkx==3.2.1
numba==0.59.0
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.19.3
nvidia-nvjitlink-cu12==12.3.101
nvidia-nvtx-cu12==12.1.105
optuna==3.5.0
packaging==23.2
pandas==2.2.0
Pillow==9.2.0
platformdirs==4.2.0
pluggy==1.4.0
protobuf==4.25.3
psutil==5.9.8
pyarrow==15.0.0
pygame==2.1.2
Pygments==2.17.2
pylint==3.0.3
pynvml==11.4.1
pyparsing==3.1.1
pytest==8.0.1
python-dateutil==2.8.2
pytz==2024.1
PyYAML==6.0.1
requests==2.31.0
rich==13.7.0
scalene==1.5.34
scipy==1.12.0
sentry-sdk==1.40.6
setproctitle==1.3.3
Shimmy==1.3.0
six==1.16.0
smmap==5.0.1
SQLAlchemy==2.0.27
stable-baselines3==2.2.1
sympy==1.12
tensorboard==2.16.2
tensorboard-data-server==0.7.2
tk==0.1.0
toml==0.10.2
tomli==2.0.1
tomlkit==0.12.3
torch==2.2.0
tqdm==4.66.2
triton==2.2.0
typing_extensions==4.9.0
tzdata==2024.1
urllib3==2.2.1
wandb==0.16.4
Werkzeug==3.0.1
loguru==0.7.2
svgelements==1.9.6
gymnasium>=1.0.0
gym>=0.26.2
loguru>=0.7.2
numba>=0.60.0
numpy>=1.26.4
optuna>=4.1.0
psutil>=6.1.0
pygame>=2.6.1
pytest>=8.3.3
scalene>=1.5.48
torch>=2.5.1
tqdm>=4.67.0
wandb>=0.18.7
svgelements>=1.9.6
stable-baselines3[extra]>=2.4.0
shimmy>=2.0.0
14 changes: 7 additions & 7 deletions robot_sf/gym_env/env_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"""

from typing import Union
from dataclasses import dataclass
from dataclasses import dataclass, field

from robot_sf.nav.map_config import MapDefinitionPool
from robot_sf.sensor.range_sensor import LidarScannerSettings
Expand All @@ -36,11 +36,11 @@ class EnvSettings:
"""
Data class to hold environment settings for a simulation.
"""
sim_config: SimulationSettings = SimulationSettings()
lidar_config: LidarScannerSettings = LidarScannerSettings()
robot_config: Union[DifferentialDriveSettings, BicycleDriveSettings] = \
DifferentialDriveSettings()
map_pool: MapDefinitionPool = MapDefinitionPool()
sim_config: SimulationSettings = field(default_factory=SimulationSettings)
lidar_config: LidarScannerSettings = field(default_factory=LidarScannerSettings)
robot_config: Union[DifferentialDriveSettings, BicycleDriveSettings] = field(
default_factory=DifferentialDriveSettings)
map_pool: MapDefinitionPool = field(default_factory=MapDefinitionPool)

def __post_init__(self):
"""
Expand Down Expand Up @@ -72,7 +72,7 @@ class PedEnvSettings(EnvSettings):
"""
Data class to hold environment settings for a simulation that includes an ego pedestrian.
"""
ego_ped_config: UnicycleDriveSettings = UnicycleDriveSettings()
ego_ped_config: UnicycleDriveSettings = field(default_factory=UnicycleDriveSettings)

def __post_init__(self):
"""
Expand Down
8 changes: 4 additions & 4 deletions robot_sf/ped_ego/unicycle_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def min_velocity(self) -> float:
@dataclass
class UnicycleDriveState:
"""A class that represents the state of a unicycle drive pedestrian."""
pose: PedPose
velocity: float = field(default=0)
pose: PedPose = field(default_factory=lambda: ((0.0, 0.0), 0.0))
velocity: PolarVec2D = field(default_factory=lambda: (0.0, 0.0))

@property
def pos(self) -> Vec2D:
Expand Down Expand Up @@ -121,11 +121,11 @@ def _norm_angle(self, angle: float) -> float:


@dataclass
class UnicycleDrivePedestrian():
class UnicycleDrivePedestrian:
"""Representing a pedestrian with unicycle driving behavior"""

config: UnicycleDriveSettings
state: UnicycleDriveState = field(default=UnicycleDriveState(((0, 0), 0), 0))
state: UnicycleDriveState = field(default_factory=UnicycleDriveState)
movement: UnicycleMotion = field(init=False)

def __post_init__(self):
Expand Down
Loading

0 comments on commit e12681b

Please sign in to comment.