User Tools

Site Tools


installing_xenomai3_podo3_and_qt

Installing Xenomai, PODO, and QT

How to use this tutorial


This tutorial will take the reader step by step on how to install Xenomai, PODO3, and QT onto a computer. This tutorial assumes that the reader has experience with Ubuntu. I will be using Ubuntu 16.04 for this tutorial. Although it is possible to do it in 14.04 it is not recommended. The reader will also need to have an account to edit this page to get access to commented out information. I also I recommend that the reader go through the tutorial once before, or have this tutorial open as the reader goes through the process on a different computer. The reader should be able to finish this tutorial in about 1.5~2hr.

Please note that if you are using a computer with a dedicated graphics card you may run into graphical problems and may need to do additional steps to complete this tutorial.

If the reader doesn't know how to install Ubuntu please follow these links to learn how to:


Note: (02/12/18) The podo code has been updated to work with Ubuntu 16.04 and is now recommended that you continue with 16.04 for the rest of this tutorial. All the instructions are the same regardless.
This tutorial will follow the following format:

The Initial Settings (for NUC's only)


1. Download the BIOS update file to a usb flash drive from https://downloadcenter.intel.com/search?keyword=NUC5i7RYH. The latest version is (2016.7.13) RY0358.

2. Enter the BIOS setting (F2) to enter the check eliminating legacy Boot. Go to Advance –> power –> after power failure and change power on to restart after a power failure.

3. Press F7 to select the update file on the usb flash drive and update the BIOS.

4. Install ubuntu 16.04 (Recommended)
14.04 has problems with software compatibility

Xenomai3 Instalation


1. Search your computer for the Software Updater and make sure that everything is up to date.

2. Open a new terminal and run the command:


sudo apt-get install devscripts debhelper dh-kpatches findutils




3.Then run the command:


sudo apt-get install kernel-package libncurses5-dev fakeroot zlib1g-dev




Note: If you have ROS installed it is possible for you to get more (>400) files not upgraded. Don't worry, as long as there were no error messages with the installation all is well.


4. Then open the Ubuntu Software Center to install the Synaptic Package Manager. If you can't find it in the software center open a terminal and run


sudo apt-get install synaptic


Then run the Synaptic Package Manager to check off these packages for installation:

  • build-essential
  • automake
  • libtool
  • libpopt-dev
  • libglu1-mesa-dev
  • libglade2-dev



5. Click Apply to finish the installation.

NOTE: You do not need to use the synaptic package manager to install the needed packages. You can do the same thing with:


sudo apt-get install build-essential automake libtool libpopt-dev libglu1-mesa-dev libglade2-dev


However, synaptic package manager is a good package manager to have anyways so I would recommend getting it regardless.


6. If you were using the synaptic package manager close it, open a new terminal and run the command:


sudo nautilus


You will probably see an error message in the terminal but as long as a file manager opens up you can ignore it.

7. Get the download file for Xenomai from the lab manager, or email me. When asking please tell them what version of ubuntu and how new your computer is. The version of xenomai needed will differ depending on these factors. Afterwards unzip it and put it inside usr/local/src. Use the File Manager window created by nautilus.



8. Once done with nautilus close it and the terminal. Then in a new terminal run the command:


sudo passwd root


Then set the password to 'rainbow' if your using a lab NUC. Otherwise it's up to you. Then run the command:


su


to enter administrator mode.

9. The following command will differ based on which version of ubuntu you are installing. For ubuntu 14.04 and older use:


cd /usr/local/src/Xenomai/Kernel


For Ubuntu 16.04 and newer use:


cd /usr/local/src/RTOS/Linux


Then


dpkg -i *.*


If you get an error message about a “core-dump” the use this command instead:


dpkg -i linux-*




10. Run the command:


reboot


to restart the computer. As it is starting up again press esc to enter grub. Select Advanced Ubuntu mode and once in, select the Xenomai version to boot up. It should be the 6th from the top starting at 0. This is the counting scheme for grub and will be used later on.
img_20160728_180853.jpg img_20160728_180135.jpg
11. Open a new terminal and run the command:


uname -a


and confirm the message created by the command. It should now show that you are in Xenomai. If you aren't go back to grub and make sure that you boot using Xenomai.

12. Run the command


su


The following command will differ based on which version of Ubuntu you installed. For Ubuntu 14.04 and older use:


cd /usr/local/src/Xenomai/Library


For Ubuntu 16.04 and newer use:


cd /usr/local/src/RTOS/Xenomai


finally use:


dpkg -i *.*


13. run the command:


exit


14. Run the command:


sudo adduser [username] root


15. Run the command:


sudo adduser [username] xenomai




16. Run:


su


then:


cd /usr/lib/xenomai/testsuite


17. Run:


./latency


to determine if Xenomai is working properly.

Setting the Default Boot to Xenomai

Note: This step is not recommended if you are dual booting or need access to another version of Ubuntu on the same machine. It is possible to skip this step, as this is only a convenience for machines that work exclusively with PODO.

1. Open a new terminal and run the command:


sudo gedit /etc/default/grub


2. Change GRUB_DEFAULT = 0 to GRUB_DEFAULT = “1>[the number placement of xenomai in grub (default is usually 6)]”
Note: Don't forget the quotation marks around the grub default ex. “1>6”

3. Save and close the window and run:


sudo update-grub


PCan Driver Instalation

1. Go to this link

2. Download the 7.15.2 version and extract

3. In a terminal 'cd' inside the extracted folder and run the commands:


make clean


and


make NET=NO_NETDEV_SUPPORT


4. Run:


su -c “make install”


Note: If you are just copy and pasting all of the commands it can sometimes copy invisible characters into the command line. If you get any errors with the previous command just type it out manually.

5. Run:


sudo /sbin/modprobe pcan


then run:


lsmod


to make sure that PCan was successfully installed.

QT Instalation

1. Download the .run file from this link (download.qt.io/archive/qt). Look for version 5.5.1.

Note: If you are using the newest xenomai 4 you can download qt 5.7.0 instead (https://download.qt.io/official_releases/qt/5.7/5.7.0/). Make sure you download the linux version not the android one. The rest of the commands are the same regardless of qt version.

2. Find the directory holding the .run file and cd to it. Then run:


sudo chmod 777 [name of .run file]


to change it into an executable file.

3. Run:


sudo ./[name of .run file]




4. Make sure that the files are installed into your /opt directory.

Xenomai debug.h Modification

1. Run:


sudo nautilus


2. Go to the usr/include/xenomai/copperplate/ folder and open the debug.h file.

3. Comment out the two #define debug lines.

4. You can now close everything.

Installing PODO

1. First go to the lab manager or email me to get the link to download all of the necessary files.


2. After extracting the file create a copy so that you will have an original copy to fall back on. Also rename it so you don't get them mixed up.

3. Once you have your personal copy open qt. Once in qt go to File→Session Manager. Once inside Session Manager create a new session, name it what ever you want. Then double click it inside the Session Manager to edit the session.

4. Now go to File→Open File or Project. Find your personal copy and go to [your personal copy]→podp_nrl→src→ALPrograms. Once in find the .pro file and open it. If a pop up comes up click yes and then configure project in the next screen.

5. Do this for Daemon, PODOGUI, and PODOLauncher as well.

6. Once you have all of the projects open in your session go to the projects tab and change the build directory path. Click on the browse button in General and find your folder→podo_nrl→build. Then find the appropriate folder for the project (ex for ALPrograms go into ALBuild) and click open.

Note: If you don't have the build folder in your file run the build.sh file inside your podo file from a terminal:


sudo chmod +x build.sh
./build.sh




7. Make sure that both Release and Debug have the same path. Repeat this for all the other projects, making sure that both Release and Debug have the same build directory. As shown in the second picture you may see a warning, you can ignore it.

8. In the bottom left-hand corner of the QT window there is a computer icon, click it and make sure that all the projects are in release mode instead of Debug mode.

9. Once you have all of them in your session go to Build→Rebuild All.

Note: If you get an error about being unable to locate -lrbmodel just add the RBModel project and rebuild it byitself before rebuilding the others. This will create the rbmodel library the code is looking for. Don't forget to change the build location like the other projects for RBModel.


10. Now right click PODOLauncher in qt and run it.

11.You should see a pop up called Daemon Launcher. If you don't look at the top bar and click on the blue rocket then click restore. Click Change Daemon and make sure that is connected to the correct Daemon file. Then do the same thing with PODOLauncher.

12. Click Start Daemon and Start GUI to make sure that they are connected correctly. You should see these two windows pop up.

13. To exit PODO3 click the blue rocket icon at the top right of your screen then press 'stop Daemon' then 'stop GUI' and finally 'exit'.

installing_xenomai3_podo3_and_qt.txt · Last modified: 2018/06/11 18:26 by keitaronishimura