To add networks at a later stage or modify existing settings, edit the /etc/netplan/50-cloud-init.yaml
file on your robot.
sudo nano /etc/netplan/50-cloud-init.yaml
The file should look like:
network:
version: 2
wifis:
renderer: networkd
wlan0:
access-points:
SKYNET:
password: PASSWORD_STRING
dhcp4: true
optional: true
After modifying it, execute sudo netplan generate
and sudo netplan apply
.
If you can’t reach your robot, you can remove the SDCard from the RaspberryPI, and connect to a computer by means of an SDCard reader. You can manually edit this file then boot the RaspberryPI with the SDCard to gain access to your robot.
Execute the following command on the robot
ubuntu@robot$ sudo curl google.com
If connected to internet, command will return html from google.
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
If you can connect to the internet in an environment but your robot can’t follow the procedure below to bridge the connection between your laptop and your robot whenever you need internet access on the robot.
nm-connection-editor
IPV4
tabNow you should be able to SSH to your robot.
ssh robot
Next Section: Introduction to ROS