Showing posts with label Orocos. Show all posts
Showing posts with label Orocos. Show all posts

Friday, October 30, 2009

Lane detection, following and obstacle detection and avoidance

Here is our group's robot. The main work includes:

1. Lane detection
2. Lane following
3. obstacle detection
4. obstacle avoidance
5. Real time system

Anyway, it works now. Now I need do more work to challenge more complex situation and explore much more my own research and implement them on this volksrobot.

Monday, March 16, 2009

A real time tool can not promise your task is real time

A real time tool like Orocos RTT can not promise that your task is real time task.. It just means that you can use it to build real time task.

A simple case is that:
I have two task, one is period task which has lower priority than the other aperiodic task. If aperiodic need more process time than the interval time of period task, the periodic task can not run anymore as it can not get cpu time. So the periodic task is not periodic anymore. Of course ,for periodic task is not realtime. But if aperiodic task has highest priority in the OS, it will be realtime task.

So whether the task is realtime depends on how you design your multi-task. The real time tools like RTAI or RTLINUX ,hence orcos just give you the ability to build your realtime task.

Saturday, March 14, 2009

Orocos: real time multi-task system

What's mean real time?
It does not mean it's fast. It means the task can be finished in a certain time(determination) with out disturbed by system process or user process.
For a period task, it will run and if it was finished in one period, it will wait next period. When it's waiting , the processor will give the time to other process, which can run for a moment, so that the processor can use more time efficiently .

Orocos : the way to trigger nonperiod activity update funtion

For NonPeriod Activity, the updateHook just can work once after start. But how can I make it work when events come or command come?

Three ways to make updateHook work again for NonPeriod activity:
1, The simple way is add trigger in the updateHook function. But this way will waste the processor time. It likes a loop.
2, Using command method. If other task use this NonPeriod activity's command, then it will run again. The NonPeriod activity engine will first run command, and then run updateHook function.
3, Using event method. But event has two kinds. One is synchronous and the other one is asynchronous. Only the asynchronous one can be used to trigger updateHook. The reason is if the call back is in this NonPeriod activity, synchronous only make this call back run in caller's engine but not this NonPeriod activity's engine. Asynchronous will make the call back part work in the NonPeriod activity's engine.

Tuesday, February 17, 2009

DataPort vs BufferPort in Orocos

Some difference between DataPort and Bufferport in orocos are:
1, DataPort is copy value from sender to receiver that means it can have many receivers. But for Bufferport , it 's cut that means if sender port just has one data, if one receiver get this value ,then the bufferport will become empty and other receivers can not get value anymore.
2, DataPort always ready to be written and just has one data. BufferPort has size, if it's full ,then the action "Push" will return false, and if it's empty , then the action "Pop" will return false.

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
../configure
--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.
6.after configure.do:

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:
make
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:
http://people.mech.kuleuven.be/~orocos/pub/stable/documentation/rtt/v1.6.x/doc-xml/orocos-installation.html#install-debian

Finally I finished it..^_^