Skip to content

Commit

Permalink
add conda environemnt yml file; change camera fov to reflect accurate…
Browse files Browse the repository at this point in the history
… stats (60 degree FOV)
  • Loading branch information
vrautela committed Aug 9, 2022
1 parent 614511b commit 039b4c8
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 4 deletions.
58 changes: 58 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: cern_camera_placement
channels:
- defaults
dependencies:
- blas=1.0=mkl
- bottleneck=1.3.5=py38h080aedc_0
- brotli=1.0.9=ha925a31_2
- ca-certificates=2022.4.26=haa95532_0
- certifi=2022.6.15=py38haa95532_0
- cycler=0.11.0=pyhd3eb1b0_0
- fonttools=4.25.0=pyhd3eb1b0_0
- freetype=2.10.4=hd328e21_0
- icc_rt=2019.0.0=h0cc432a_1
- icu=58.2=ha925a31_3
- intel-openmp=2021.4.0=haa95532_3556
- jpeg=9e=h2bbff1b_0
- kiwisolver=1.4.2=py38hd77b12b_0
- libpng=1.6.37=h2a8f88b_0
- libtiff=4.2.0=he0120a3_1
- libwebp=1.2.2=h2bbff1b_0
- lz4-c=1.9.3=h2bbff1b_1
- matplotlib=3.5.1=py38haa95532_1
- matplotlib-base=3.5.1=py38hd77b12b_1
- mkl=2021.4.0=haa95532_640
- mkl-service=2.4.0=py38h2bbff1b_0
- mkl_fft=1.3.1=py38h277e83a_0
- mkl_random=1.2.2=py38hf11a4ad_0
- munkres=1.1.4=py_0
- numexpr=2.8.3=py38hb80d3ca_0
- numpy=1.22.3=py38h7a0a035_0
- numpy-base=1.22.3=py38hca35cd5_0
- openssl=1.1.1q=h2bbff1b_0
- packaging=21.3=pyhd3eb1b0_0
- pandas=1.4.3=py38hd77b12b_0
- pillow=9.0.1=py38hdc2b20a_0
- pip=21.2.2=py38haa95532_0
- pyparsing=3.0.4=pyhd3eb1b0_0
- pyqt=5.9.2=py38hd77b12b_6
- python=3.8.13=h6244533_0
- python-dateutil=2.8.2=pyhd3eb1b0_0
- pytz=2022.1=py38haa95532_0
- qt=5.9.7=vc14h73c81de_0
- scipy=1.7.3=py38h0a974cb_0
- seaborn=0.11.2=pyhd3eb1b0_0
- setuptools=61.2.0=py38haa95532_0
- sip=4.19.13=py38hd77b12b_0
- six=1.16.0=pyhd3eb1b0_1
- sqlite=3.38.3=h2bbff1b_0
- tk=8.6.12=h2bbff1b_0
- tornado=6.1=py38h2bbff1b_0
- vc=14.2=h21ff451_1
- vs2015_runtime=14.27.29016=h5e58377_2
- wheel=0.37.1=pyhd3eb1b0_0
- wincertstore=0.2=py38haa95532_2
- xz=5.2.5=h8cc25b3_1
- zlib=1.2.12=h8cc25b3_2
- zstd=1.5.2=h19a0ad4_0
prefix: C:\Users\vraut\Anaconda3\envs\cern_camera_placement
8 changes: 4 additions & 4 deletions optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
from scipy.optimize import Bounds, minimize, NonlinearConstraint
from typing import List

from guesses import gen_guess_box
from obstacles import CylinderObstacle, Obstacle
from optimization.guesses import gen_guess_box
from optimization.obstacles import CylinderObstacle, Obstacle

# TODO: change these to reflect the most accurate specs
# FOV lower bound (objects must be at least this far to be seen)
fov_lower_bound = 1
# FOV upper bound a.k.a height of the cone (objects further than this are out of range)
fov_upper_bound = 5
# FOV degree (a.k.a angle between cone axis and slant)
fov_degree = 50
fov_degree = 60
# FOV base radius (a.k.a radius of the base of the cone)
fov_base_radius = fov_upper_bound * np.tan(np.deg2rad(fov_degree))

Expand Down Expand Up @@ -350,7 +350,7 @@ def main():
x0 = gen_guess_box(V_x, V_y, V_z)

# specify the obstacles present in the space
obstacles = [CylinderObstacle(np.array([1.5,6,1.5]), np.array([2.5,6,1.5]), 0.25)]
obstacles = [CylinderObstacle(np.array([1.5,6,1.5]), np.array([2.5,6,1.5]), 1)]

res = minimize(average_reciprocal_gdop, x0, args=(obstacles,), bounds=bounds, options={"eps":0.1, "disp":True})
print(res)
Expand Down

0 comments on commit 039b4c8

Please sign in to comment.