Friday, November 28, 2008

Install Orocos on RTAI/LXRT linux system (Ubuntu 8.04)

Today I install Orocos on RTAI system.
There are many errors on the screen. But after I download and install many libraries , finally it is working now.
For Ubuntu 8.04 Hardy system, I did not do this work as
"The OROCOS Real-Time Toolkit Installation Guide " .
They said I should do like:
$ cd src
$ sudo apt-get update
$ apt-get source orocos-rtt
$ sudo apt-get build-dep orocos-rtt
$ sudo apt-get install devscripts build-essential fakeroot dpatch
$ cd orocos-rtt-1.4.0
$ dpkg-buildpackage -rfakeroot -uc -us
$ cd ..
$ for i in *.deb; do sudo dpkg -i $i; done

But I have a problem when I "sudo apt-get build-dep orocos-rtt ". It gives me errors about " 'xenomai". It 's very strange because I use RTAI/LXRT ,not xenomai.

So I change my idea and go the normal way to install it.
1, You should check the RTAI/LXRT setting("The OROCOS Real-Time Toolkit Installation Guide 2.3.1")
2,before you install orocos, make sure you have installed Boost,gcc, xerces,ace&tao,cppunit,cmake
3,download the tar ball from Orocos website.
4, Start install Orocos following "The OROCOS Real-Time Toolkit Installation Guide 1.3.3"
  mkdir orocos-rtt-1.6.0/build
cd orocos-rtt-1.6.0/build
--enable-corba --with-lxrt [--prefix=/usr/local][--with-linux=/usr/src/linux]

5.You will see some error information when you configure it.That's let you know what library you need install.

cmake ..
ccmake ..

cmake is to build makefile in build file. ccmake will let you change some option,like the directory of linux source(/usr/src/linux) and RTAI library(/usr/realtime).. Before you use this ,you should know how to use ccmake.

If there is no errors, you can continue.
7, do:
sudo make install

Then that's all.

If you want to install OCL , you should download tar ball with KDL and BFL.
Before installing OCL ,first you should install kdl and bfl. They need more libraris, such as ltilib , readline, docbook, etc..
When you install these library, you should always use "ccmake" to change some configuration about the folder directory or OROCOS_TARGET=LXRT.

SEE more:

Finally I finished it..^_^

Thursday, November 27, 2008

Ubuntu can not shutdown as NetworkManager 's problem

last time when I compiled the kernel, I choose disable ACPI in Power Management ,so that my computer can not shutdown as NetworkManager can not reply the system or using bus to send signal.
I have tried two method:
1,add "acpi=force apm=power_off" to menu.lst
2,disable NetworkManager
It still can not solve the problem.
Afterwards, I find I disable ACPI which has some functional things about managing the power for bus and others. I have a look at the guide book from
RTAI and find I need enable ACPI.

So today I recompiled the kernel and enable it. Now it's working!!!

About how to disable and enable NetworkManager:
sudo /etc/dbus-1/event.d/26NetworkManagerDispatcher stop/start
sudo /etc/dbus-1/event.d/25NetworkManager stop/start

Monday, November 24, 2008

RTAI on Ubuntu 8.04

Today I compile the RTAI on the new computer which has 4 cores.
I find a good tutorial "How to Install RTAI in Ubuntu Hardy" .
I do it by that guided book.
Three parts need to be changed:

1, In the kernel configure menu, I need turn off "cpu idle PM management" and select ACPI and deselect APM).
2,In the RTAI configure menu, I need set"General > Linux source tree =/usr/src/linux".Not the headers directory.
3, Add path" /usr/realtime/bin " to the environment. I need add the command to /home/usrname/.bashrc or /root/.bashrc.(like "export PATH=$PATH:/usr/realtime/bin")

Remove kernel version

Sometime you have two or more kernel version, these versions need more disk space . If you want to save disk space, you need remove them.

For ubuntu, I do:

.deb based distro - Debian or Ubuntu Linux

Again find out all installed kernel version:
$ dpkg --list | grep linux-image

ii  linux-image-2.6.24-19-generic              2.6.24-19.41                      Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-21-generic 2.6.24-21.43 Linux kernel image for version 2.6.24 on x86

Now remove linux-image-2.6.24-19-generic with apt-get command itself:

# apt-get remove linux-image-2.6.24-19-generic


$ sudo apt-get remove linux-image-2.6.24-19-generic

More information is in:

Do update after installing new Ubuntu system

Every time you need install ubuntu system, please remember updating and upgrading your system.

#apt-get update
#apt-get upgrade

If you dont do that, sometimes you can not find new library when you want to "search" or "install" it.