Page tree
Skip to end of metadata
Go to start of metadata

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.

Desktop Navigation

  • Window Navigation:  You will likely end working in a number of concurrent windows
    • Alt+Tab will switch between windows
  • Launching Terminals: Bringing up a new a ROS system often requires a few terminal windows
    • Ctrl+Alt+t will open a new terminal window
    • Shift+Cntl+t will open a new tab in the terminal window (having multiple terminals in a single window can be easier to navigate)
  • Command Line
    • Learn to use Tab Completion - this will save you many keystrokes
    • Learn to use the Up and Down arrows to browse your command line history for the same reason.
    • To exit a program running (in the foreground) on the terminal, use Ctrl+c
  • Copy and Paste
    • In many GUI programs the copy and paste shortcuts are the same as Windows: Ctrl-c to copy and Ctrl-v to paste.
    • For the terminal window, the shortcuts are slightly different: Shift-Ctrl-c to copy and Shift-Ctrl-v to paste.  You can also copy and paste through the menu: Edit->Copy or Edit->Paste

Asking for Help / Debugging

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.

  • In general, reproducible errors are much easier to address than intermittent ones.  If you can provide the commands that lead to the error and then the error output, that can be really helpful in determining what is wrong.
  • Copy and paste in the Gnome terminal

Finding your IP and MAC Addresses

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.

 

 

Setup Hosts File

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...

Notice to two new lines at the bottom.

Now instead of...

I could equivalently use...

 

Setting Time/Date on Raspberry Pi - without internet

Setup Local NTP Server

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

Sync form Raspberry Pi

From Raspberry Pi

Where the IP adddress is the NTP server on the local network.

 

  • No labels