-
for team members, please skip this step
-
for Ubuntu or Ubuntu Mate, please refer to ROS Installation.
-
for Raspberry Pi OS,
-
ROS Melodic is still possible to be installed on Raspberry Pi with Raspbian Buster following a different approach ROSberryPi/Installing ROS Melodic on the Raspberry Pi.
-
A tutorial to install Melodic on Raspberry Pi OS is given here.
-
- for team members, please skip this step
- for others, please ref to Section Simulation_ROS.
Connect to WIFI and open Internet settings.
Find Tap IPv4, then choose Manual instead of DHCP.
Then, input an address like 192.168.31.191 where the router's address is 192.168.31.1. Note here, the first three parts must be the same with your router's. Netmask usually should be 255.255.255.0
. More details can be found at Subnets of Linux Journey.
Install ssh on both machines
sudo apt install openssh-client openssh-server
and we ca check the installation by
On base station, we can connect to Raspberry Pi with
ssh username@servername
where servername can be IP address like 192.168.31.171 and site address like example.com
Lets say our username is drone1 and its pws is 123456.
From base station to connect.
- We start ssh request
and entre yes then
- We entre the pwd of the user of sever, i.e. drone1, which should be 123456.
-
We are now in the server as the user drone1, as you can see a new user name and a new machine name in the terminal.
-
It is not surprised that we dont want to type ip address every time. Since we know the ip address of the Raspberry Pi wont change, it is nature to think can we type something meaningful as long as my machine can understand my input and link that to the correct ip address.
Here, we can modify /etc/hosts to enable our machine to do that.
We give a name for our Raspberry Pi as dronepi1, as
- Now, we can connect to the Raspberry Pi with drone1@dronepi1
References on ssh:
We are going to use ntp service for time synchronisation such that time of onboard computer is based on that of base station.
First of all, install ntp by running
sudo apt install ntp
Check if ntp service is on or not
service --status-all
sudo systemctl status ntp.service
Check all the servers
ntpq -p
Once we can ensure Internet connection between the onboard computer and our base station, we can process ROS communication between them.
We only need to specify the IP addresses of onboard computer and base station into ROS.
- for the onboard computer, open
.bashrc
and add
export ROS_MASTER_URI=http://IP_base_station:11311
export ROS_IP=IP_onboard_computer
- for the base station, open
.bashrc
and add
#export ROS_MASTER_URI=http://master:11311
export ROS_MASTER_URI=http://IP_base_station:11311
export ROS_IP=IP_base_station
Note: this configuration only works for THE WLAN. We may need to modify the IP addresses for different WLANs.
Also, we need to comment the two commands below and uncomment the one above in order to do local simulation and experiments.
More details can be found at Running ROS on multiple machines.