External WAM PC
The Barrett-supplied WAM PC can be used for controlling the WAM and writing software. This computer contains a PCI CANbus card for communicating directly with the motor controllers of the WAM. The WAM PC runs Ubuntu 12.04 modified with the Xenomai realtime kernel patches. You will need to connect a monitor, keyboard, and mouse if you want to log into the WAM PC directly. Otherwise, you can use the WAM PC "headless" (without a monitor) by logging into it over an Ethernet network.
Ethernet / DHCP
Setting up an Ethernet connection on the WAM PC is only necessary if you want to:
- Access the Internet from the WAM PC (recommended)
- Log into the WAM PC remotely using ssh (optional)
- Use your own workstation for development and run the WAM PC "headless"
The WAM PC is configured to obtain its IP address from a DHCP server on your wired Ethernet network. Please make sure your DHCP server is configured to assign an IP address to the WAM PC. You should use a Cat5e Ethernet cable to connect the Ethernet port on the back of the WAM PC to an Ethernet switch on your network. Please note that unless you have a DHCP server running on your workstation (this is rare), you can not connect the WAM PC directly to your workstation.
When using the external WAM PC, you will not be using the supplied WiFi Access Point. Since you will be bypassing the WAM's internal PC, there is no need to connect an Ethernet cable to the ETHERNET port on the backplate of the WAM.
Discovering the WAM's IP address
When the WAM PC is turned on, it begins to boot up. After about 30 seconds, the WAM PC will request an IP address from a DHCP server. Once the WAM PC obtains an IP address, it launches a small UDP discovery application. If your workstation is connected to the same network as the WAM, then you can use the wamdiscover.exe Windows application or the wamdiscover.py Python script to determine the IP address of the WAM PC.
Logging into the WAM PC
Once you know the WAM PC's address, you can connect to it using ssh. If you have a Windows workstation, we recommend using PuTTY SSH.
The default username is "robot". The default password is "WAM".
Navigating the WAM PC's directories (via ssh)
After logging into the WAM PC, you will find yourself in the /home/robot directory. If you type "ls" then hit <Enter>, you will see a listing of the files and folders in that directory. One of the directories should be called "libbarrett_examples". If you type "cd libbarrett_examples" then hit <Enter>, you will change to that directory.
Editing source code on the WAM PC
There are several options for editing source code on the WAM PC:
- The easiest way is to use Eclipse directly on the WAM PC.
- If you prefer to use your own workstation, you can install/use Eclipse or jEdit (with its FTP plugin) or some other editor on your workstation that supports file access over sftp (ssh).
- An alternative is to enable X11 forwarding in your ssh connection to the WAM PC. At the command line, include "-Y" in your ssh connection command: ssh -Y robot@<your-WAM-IP>. In PuTTY, this setting is called Connection:SSH:X11:Enable X11 Forwarding. Then you can ssh into the WAM PC and edit files on your workstation using commands like "gedit ex01_initialize_wam.cpp &", or any other graphical editor you want to install on the WAM PC. You can also launch the file browser by typing "nautilus &". For this method to work, you will need an X11 server running on your workstation. For Windows workstations, we recommend using Xming.
- If you prefer text-based code editor like vi or emacs, you can use those directly on the WAM PC from a terminal window or over ssh.