Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Code] Changing from "_get_atributes" to "_get_attributes" #737

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions 14-truck_backer-upper.ipynb
Expand Up @@ -100,7 +100,7 @@
" return\n",
" \n",
" self.ϕ = ϕ\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_atributes()\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_attributes()\n",
" \n",
" # Perform state update\n",
" self.x += s * cos(θ0) * dt\n",
Expand All @@ -113,22 +113,22 @@
" def state(self):\n",
" return (self.x, self.y, self.θ0, *self._traler_xy(), self.θ1)\n",
" \n",
" def _get_atributes(self):\n",
" def _get_attributes(self):\n",
" return (\n",
" self.x, self.y, self.W, self.L, self.d, self.s,\n",
" self.θ0, self.θ1, self.ϕ\n",
" )\n",
" \n",
" def _traler_xy(self):\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_atributes()\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_attributes()\n",
" return x - d * cos(θ1), y - d * sin(θ1)\n",
" \n",
" def is_jackknifed(self):\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_atributes()\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_attributes()\n",
" return abs(θ0 - θ1) * 180 / π > 90\n",
" \n",
" def is_offscreen(self):\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_atributes()\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_attributes()\n",
" \n",
" x1, y1 = x + 1.5 * L * cos(θ0), y + 1.5 * L * sin(θ0)\n",
" x2, y2 = self._traler_xy()\n",
Expand All @@ -155,7 +155,7 @@
" self.patches = list()\n",
" \n",
" def _draw_car(self):\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_atributes()\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_attributes()\n",
" ax = self.ax\n",
" \n",
" x1, y1 = x + L / 2 * cos(θ0), y + L / 2 * sin(θ0)\n",
Expand Down Expand Up @@ -186,7 +186,7 @@
" self.patches += [car, bar, left_wheel, right_wheel]\n",
" \n",
" def _draw_trailer(self):\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_atributes()\n",
" x, y, W, L, d, s, θ0, θ1, ϕ = self._get_attributes()\n",
" ax = self.ax\n",
" \n",
" x, y = x - d * cos(θ1), y - d * sin(θ1) - W / 2\n",
Expand Down Expand Up @@ -252,7 +252,7 @@
"episodes = 10\n",
"inputs = list()\n",
"outputs = list()\n",
"# truck = Truck(); episodes = 10_000 # uncooment for creating the data set\n",
"# truck = Truck(); episodes = 10_000 # uncomment for creating the data set\n",
"\n",
"for episode in tqdm(range(episodes)):\n",
" \n",
Expand Down