-
Notifications
You must be signed in to change notification settings - Fork 0
Configure a robot from scratch
- Install Ubuntu OS
- Install ROS
- Install Graphics Drivers and Packages
- Configure the bwilab User Account
- Configure Network Connections
- Setup the Wireguard VPN
- Setup LDAP User Authentication
- a usb drive
- to be located on the UT network
Install Ubuntu according to the official instructions.
Use Ubuntu 22.04 LTS release.
Create the username bwilab with the correct password, and fill in the appropriate host name. If you need to make up a new one, pick an unused Futurama character.
Do not create user bwi, that is defined via LDAP.
After initial installation completes, remove USB key and reboot.
After reboot, log in as bwilab, update the apt repository and upgrade packages with
sudo apt update && apt upgrade -y
You may need to restart your system to use all the device drivers properly.
Add the Google Chrome repositores:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list'
Install some more packages:
sudo apt-get update
sudo apt-get install emacs gnome-tweak-tool openssh-server openssh-client terminator vim nano git mercurial sshfs subversion libtbb-dev build-essential
The latest supported version of ROS is Melodic which works best on Ubuntu 18.04. If using a newer version of Ubuntu OS, use the bwi-docker image. Otherwise, you can install Melodic locally according to the ROS install documentation:
http://wiki.ros.org/melodic/Installation/Ubuntu
The easiest method for installing the NVIDIA graphics card divers is to use the Ubuntu Software & Updates application. Choose this application from the applications list, and select the "Additional Drivers" tab.
Choose "NVIDIA driver metapackage from nvidia-driver-*(proprietary, tested)".
Then select the "Apply Changes" button to install and apply the selected drivers. The NVIDIA drivers require restart and may also require accepting the MOK on secure boot.
Version: CUDA Toolkit 11.8
Visit https://developer.nvidia.com/cuda-downloads and enter the following configuration to get install instructions:
OS: Linux
Architecture: x86_64
Distribution: Ubuntu
Version: 18.04
Installer type: deb(local)
For "bwilab" to be able to run the robot, it must belong to the "dialout" group:
sudo usermod -a -G dialout bwilab
For the robot to have authorized access to the lab server: build, install, and configure the "bwi_lab" repository. You must be logged in as "bwilab" for this step.
Robots connect to the utexas-iot
wifi network. LARG lab uses a lab EID to manage devices and their passwords for this network. If you are setting up a computer that was previously connected, then it likely already has a password assigned, which can be found at network.utexas.edu and logging in with the LARG group EID.
To add a new device, locate the computer's wifi interface mac address in the details for device named wlp*
in the list provided by the following command:
ip a
Add the device to the LARG group utexas-iot wireless devices. If you do not know the password for LARG utexas-iot devices, ask a Research Engineer or lab faculty to share the credentials over the UT Stache password manager. After adding the new device to the wireless devices list, use the generated password to login to the utexas-iot wi-fi.
Finally, we may need to manually configure some Ethernet ports, depending on the devices attached.
These are done using the graphical network manager, so it will be easy to switch back to wired Internet connection, if needed.
For the Ethernet-attached Segway bases:
In network manager, "Edit connections...", then select the correct "wired connection". Unfortunately, that may require some trial and error. Try connecting the Ethernet wire first, and see if one of the connections shows up highlighted.
Connection Name: Segway RMP 110
IPv4 Settings: Manual
address: 10.66.171.1
netmask: 255.255.255.0
gateway: <blank>
Select "require IPv4 addressing for this connection to complete".
For an Ethernet-attached Hokuyo laser:
In network manager, "Edit connections...", then select "wired connection 1".
Connection Name: 192.168.0.X
IPv4 Settings: Manual
address: 192.168.0.1
netmask: 255.255.255.0
gateway: <blank>
Select "require IPv4 addressing for this connection to complete".
For machines with a Velodyne LIDAR attached, configure it on a separate port, following these directions:
The robots use the AMRL Wireguard VPN to communicate with other machines on the same virtual network. This enables several things:
- A specific IP assignment
- Secure connection to the virtual network
- Communication with robofleet_server and other robofleet_clients, including the web client at https://robofleet.csres.utexas.edu
- Install wireguard and tools:
sudo apt-get install wireguard wireguard-tools
- Find the config file and public and private keys for the machine on UT Box and save them in (requires sudo access):
/etc/wireguard/
- Start the wireguard interface with
sudo wg-quick up wg0
- Check that the machine has successfully connected to the AMRL server with
ping (the server ip)
you should receive a response
- Make VPN connection come up on boot:
sudo systemctl enable wg-quick@wg0
LDAP stands for Lightweight Directory Access Protocol. We use it to share user and group identifiers within the lab. We maintain an LDAP server that serves authentication to LDAP client machines so that lab members may login to any client machine with their own username and password. As such, robots are setup as LDAP clients.
sudo apt-get install libnss-ldapd libpam-ldap nscd
You will be asked some configuration questions. Answer them carefully.
For LDAP: Set the server URI to:
ldap://nixons-head.csres.utexas.edu/bwildapadmin
Make sure it's not “ldapi:”.
Set the server LDAP search base to:
dc=nixons-head,dc=csres,dc=utexas,dc=edu
For libnss-ldapd configuration, select: “group”, “passwd”, and “shadow”.
Set the LDAP version to 3.
Again, set the server URI to:
ldap://nixons-head.csres.utexas.edu/bwildapadmin
And again, set the distinguished name of the search base:
dc=nixons-head,dc=csres,dc=utexas,dc=edu
Make local root Database admin: Yes
Does the LDAP database require login? No
LDAP account for root:
cn=admin,dc=nixons-head,dc=csres,dc=utexas,dc=edu
Set the LDAP root account password to the appropriate value.
If you make a mistake and need to change a value, go through the menu again by issuing this command:
sudo dpkg-reconfigure ldap-auth-config
Edit the /etc/ldap.conf file:
sudo vim /etc/ldap.conf
# Make sure local logins still work, even when networking
# is disabled for some reason (e.g. while booting).
timelimit 120
bind_timelimit 120
idle_timelimit 3600
# This leads to a delay of 124 seconds (4+8+16+32+64=124)
# per lookup if the server is not available.
nss_reconnect_tries 5 # no. of times to double the sleep time
nss_reconnect_sleeptime 4 # initial sleep value
nss_reconnect_maxsleeptime 64 # max sleep value to cap at
nss_reconnect_maxconntries 2 # how many tries before sleeping
Make sure there is a final newline at the end.
Edit the /etc/pam.d/common-session file:
sudo vim /etc/pam.d/common-session
Before the "session optional pam_ldap.so" line, add this:
session required pam_mkhomedir.so skel=/etc/skel umask=0022
This will create a home directory on the client machine when an LDAP user logs in who does not have a home directory.
Restart the service for these changes to be implemented:
sudo /etc/init.d/nscd restart
Login using your own LDAP user account:
ssh joq@localhost
Give the correct password. Verify the home directory, and group memberships:
$ id
uid=10047(joq) gid=10000(bwi) groups=10000(bwi),20(dialout),27(sudo),10002(fri)
$ pwd
/home/users/joq
$ ls -l
-rw-r--r-- 1 joq bwi 8980 Jul 15 18:05 examples.desktop
Or, something similar.
Logout using ^D or exit.
Create a workspace, then install and build our core software as described here:
* https://github.com/utexas-bwi/bwi/blob/master/README.md
Source the workspace, and install our custom UDEV rules:
source ~/catkin_ws/devel/setup.bash
rosrun segbot_bringup udev_install
Then reboot.
After that, login again and run the basic tests, as described here: Segbot Regression Testing