There are many, many great tutorials, references and cheatsheets on the internet that you will undoubtedly need to consult as you learn to use Linux. Below, are some of the most common useful tips and tricks that may help you be productive and efficient you learn Linux for the purposes of using ROS.
There are two options for interacting with the Git remote server (clone, push, pull, etc.): HTTPS and SSH
Setting up an SSH connection between your computer and the GitLab server takes a few minutes to setup, but allows you to clone and push without entering your GitLab password.
Here are instructions on setting this connection up with GitLab. The instructions are verbose, so here is a condensed summary for our use case...
On your computer, generate local SSH keys
ssh-keygen -o -t rsa -b 4096 -C "email@example.com"
This should generate both private and public keys as files in the
Echo the public key to the terminal
ssh-rsaand ends with the email you provided.
Done - once you GitLab has your public key you should be able to clone, push and pull using the SSH protocol.
For assignments and tutorials, the best way to document problems is to use the comments section of the particular wiki page you are using. The authors, and anyone else "watching" the page are immediately notified.
If your problem includes computer issues (errors from comments, code snippets, etc.) it is a good idea to include the commands you issued (you can use the
history command in a terminal to see what commands you have issued) and any error reports. If you are attempting to paste terminal commands, code, etc. into the comment, use the Code Block Macro feature to avoid formatting problems with the text you are placing in the comment.
An easy way to examine the status of the network on your computer is with the
ifconfig command. The example output below highlights some of the more useful parts of the output.
If there is no IP address listed in the output, then that adapter does not have an active connection.
Example - local lab wifi network with reserved IP addressed for robots. Tired of remembering and typing IP addresses. Add lines to the
/etc/hosts file so that we specify the correspondence between IP addresses and hostnames (as listed in Robotics Computation Lab).
For example, I could add two specific turtlebots to my hosts file so that it looks like...
127.0.0.1 localhost 127.0.1.1 nunu # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters # FRL Turtlbots 192.168.11.100 burger0 192.168.11.101 smash
Notice to two new lines at the bottom.
Now instead of...
I could equivalently use...
Eg., on a laptop connected to local wifi. Following directions http://captainbodgit.blogspot.com/2013/10/raspberrypi-keeping-time-without.html
Backup, then edit /etc/ntp.conf
#server time.nps.edu server 127.127.1.0 prefer fudge 127.127.1.0 stratum 10 # Give machines on our network access to query us restrict 192.168.11.0 mask 255.255.255.0 nomodify notrap broadcast 192.168.11.0
From Raspberry Pi
sudo ntpdate 192.168.11.109
Where the IP adddress is the NTP server on the local network.