Showing posts with label RTAI. Show all posts
Showing posts with label RTAI. 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.

Tuesday, January 20, 2009

Multi-threads program

Before I always think Multi-thread program is difficult and a little bit huge !^_^



Today I realize one simple parallelize program by two threads.Although it did not fulfill my idea,but it do I told it..
That's not so difficult to know what's the multi-thread and write a simple example program..
Yes it's still huge because it want to do more work and fulfill more ideas. But for me or some task ,,we just need one pieces of it..So dont fear any more ..

Fear is because you know nothing about it..Just sit down and concentrate to read books and google. Then you will find it's not so difficult to do it like other guys..

Here is a very nice tutorial about pthreads.
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html


Ps:Under linux c++, you can not define function like void* function(). Maybe you can do it in c language under c compiler. But for c++, GCC or G++ will give you wrong information about the function's parameter. I solved it by define function like void* function(void * p);
Here p is no used but you do need it to compile your program...

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")