Goals for week 4 [July 1 – July 3, Jul4+5: holiday]
- Getting to the operation testing stage of duckiebot
- Literature Review
day3_wed_jul3
To do:
- Presenting at the department meeting [Done]
- Work on updating the duckietown shell and the duckiebot for leafduck
- Connect with the dashboard and see all components on the dashboard.
- Update this week’s documentation with bugs and fixes.
Progress Updates
1. Connecting to the dashboard
[Problem] Facing issues trying to turn on the duckiebot after shutting it down yesterday. When it was shut down, lights were green and white.
[Attempts]
- Pushed the SD card out and pushed it back in. [Result: no response]
- Tried to ssh into it. [Result: as expected, cannot be found].
[Notes]
Last week, when I came back to check it on Saturday to see how the connection was, I am not sure if I re-inserted the SD card, or if I had not put in the SD card after I re-flashed it the day before.
Next Steps:
- Will try reflashing the SD card, if leafduck cannot turn on.
[Update]
Flashed the SD card, have not attempted to put in the bot and reboot yet.
day2_tues_jul2
To do:
- Get new duckiebots 21J
- Wifi connection issues with Luke
Progress Updates:
1. Leafduck hut broke (yesterday)
[How it broke]
Was not properly shutdown, so I wanted to hard power it down by disconnecting the battery cable and the input pin on the hut broke apart.
[What were the fixes]
– exchanged the hut of the 21J with leafduck’s broken hut
– reflashed the SD card and insert it in leafduck
– lights are on but wifi dongle not blinking, motors not running, dashboard not working, top power button not blinking.
[Notes]
– Rainduck’s 21J hut is probably broken? That is why the ethernet may not have been working for it then too.
2. Connecting through the ethernet
– Went down to Fimbel lab to discuss setting up a personal wifi network in the lab with Luke.
– Inserted leafduck’s flashed SD card into Ellenduck. Ellenduck was able to connect to wifi (wifi dongle blinking), dashboard turned on, head lights and rear lights were white. Unlike leafduck, ellenduck’s wheels did not start.
[The Process of Setting Up a Ethernet Connection]
- According to Luke, there need to be some other component between the computer and the bot, if we want to connect them over the ethernet. This assumption was what we followed when connecting to the ethernet in Fimbel Lab.
- Set up the connection in
nm-connection-editor
(steps found in duckiebot documentation). - Check
ifconfig
to see the connection. In this case the IP address for the duckiebot is138.110.217.57
- The duckiebot is also showing up when we do
dts fleet discover.
- Copy-pasted the IP address into the browser finder
- Signed into my duckietown account (my User id is #9215)
3. Leafduck hut replacement with new DB21J hut
setting up ethernet
errors with updates
– working well
– got up to trying to update the duckiebot but running into errors with docker permissions. (Could it be duckietown shell and docker version mismatch?)
– see error below
Traceback (most recent call last):
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/venv/lib/python3.10/site-packages/docker/api/client.py", line 268, in _raise_for_status
: response.raise_for_status()
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/venv/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
: raise HTTPError(http_error_msg, response=self)
: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http+docker://localhost/v1.46/auth
:
: The above exception was the direct cause of the following exception:
:
: Traceback (most recent call last):
: File "/home/nyi22y/.local/lib/python3.10/site-packages/dt_shell/environments.py", line 43, in execute
: shell.onecmd(cmdline)
: File "/usr/lib/python3.10/cmd.py", line 217, in onecmd
: return func(arg)
: File "/home/nyi22y/.local/lib/python3.10/site-packages/dt_shell/shell.py", line 729, in <lambda>
: do_command_lam = lambda s, w: do_command(s, w)
: File "/home/nyi22y/.local/lib/python3.10/site-packages/dt_shell/commands/commands.py", line 136, in do_command
: return descriptor.command.command(shell, args)
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/commands/duckietown/desktop/update/command.py", line 85, in command
: login_client_OLD(client, shell.shell_config, registry_to_use, raise_on_error=False)
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/commands/duckietown/utils/docker_utils.py", line 195, in login_client_OLD
: _login_client_OLD(
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/commands/duckietown/utils/docker_utils.py", line 210, in _login_client_OLD
: res = client.login(username=username, password=password, registry=registry, reauth=True)
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/venv/lib/python3.10/site-packages/docker/client.py", line 199, in login
: return self.api.login(*args, **kwargs)
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/venv/lib/python3.10/site-packages/docker/api/daemon.py", line 152, in login
: return self._result(response, json=True)
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/venv/lib/python3.10/site-packages/docker/api/client.py", line 274, in _result
: self._raise_for_status(response)
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/venv/lib/python3.10/site-packages/docker/api/client.py", line 270, in _raise_for_status
: raise create_api_error_from_http_exception(e) from e
: File "/home/nyi22y/.duckietown/shell/profiles/daffy/venv/lib/python3.10/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
: raise cls(e, response=response, explanation=explanation) from e
: docker.errors.APIError: 401 Client Error for http+docker://localhost/v1.46/auth: Unauthorized ("Get "https://registry-1.docker.io/v2/": unauthorized: incorrect username or password")
Fix attempts for update error
rm ~/.docker/config.json
docker login
sudo systemctl restart docker
sudo systemctl restart apache2
ChatGPT explanation:
The two lines of code are used to restart the Docker and Apache2 services on a Linux system that uses systemd
for managing system services.
sudo systemctl restart docker
:
- Purpose: This command restarts the Docker service.
- Explanation: Docker is a platform used to develop, ship, and run applications inside containers. Restarting the Docker service can be necessary after making configuration changes, updating Docker, or troubleshooting issues with container operations.
sudo systemctl restart apache2
:
- Purpose: This command restarts the Apache HTTP Server (commonly known as Apache2).
- Explanation: Apache2 is a widely-used web server software. Restarting the Apache2 service is often required after making changes to its configuration files, installing new modules, or applying updates.
Both commands use sudo
to execute with superuser (administrator) privileges, as restarting system services typically requires elevated permissions.
Posted question on stackoverflow