About the ORO_SCHED_RT and ORO_SCHED_OTHERS

Hi all,

I have a robot program running on Orocos, which has three component :
Camera, SerialPort and WorkPart. The component WorkPart gets image from
Camera and give command to robot by SerialPort. The WorkPart also need
feedback data from SerialPort.
But it just can work very well when I use ORO_SHECK_OTHERS. If I use
ORO_SCHED_RT, the SerialPort can not feedback correctly. Maybe it becauses I
give the wrong priority for three component.
I gave the WorkPart highest priority and gave lower priority for Camera and
SerialPort.
If I run three component in the same time, does that mean the WorkPart will
run all the time because it has highest priority and the others need to
wait??
I know a little about real time schedual, anyone can give a suggestion?

Sincerely,
GL

About the ORO_SCHED_RT and ORO_SCHED_OTHERS

On Thursday 12 March 2009 14:20:23 guoliang liu wrote:
> Hi all,
>
> I have a robot program running on Orocos, which has three component :
> Camera, SerialPort and WorkPart. The component WorkPart gets image from
> Camera and give command to robot by SerialPort. The WorkPart also need
> feedback data from SerialPort.
> But it just can work very well when I use ORO_SHECK_OTHERS. If I use
> ORO_SCHED_RT, the SerialPort can not feedback correctly. Maybe it becauses
> I give the wrong priority for three component.
> I gave the WorkPart highest priority and gave lower priority for Camera and
> SerialPort.
> If I run three component in the same time, does that mean the WorkPart will
> run all the time because it has highest priority and the others need to
> wait??
> I know a little about real time schedual, anyone can give a suggestion?

If you run a component with a NonPeriodicActivity and ORO_SCHED_RT and the
component runs in an 'infinite loop', it will prevent all the other components
to run with a lower priority. (99 is highest, 1 is lowest).

This issue is less with PeriodicActivity, because they go to sleep
periodically, which offers an opprotunity for the lower priority tasks to run.

Peter