Re: (no subject)

Peter Soetens <[email protected]>
Newsgroups gmane.science.robotics.orocos.user
Organization KU Leuven
Message-ID <[email protected]>
On Thursday 20 May 2004 14:23, Andrea Consonni wrote:
> Hi,
>   We are here again :-).
>
> We are interested in your HMI support components and we want to use them
> in our application.
>
> We have tested them and we have noticed that in some cases, when the
> application is running, all stalls with the exception of the Report which
> works. When we "quit", the application destroys the NonRealTimeThread, but
> when it tries to terminate the ZeroTimeThread, the message "Finalizing
> thread after 1000 tries" appears and the application doesn't go forward. We
> have to terminate it pressing "CTRL+c".

This looks like a deadlock in the realtime threads. Moreover, (as you maybe 
know) there is a bug 'somewhere' (rtai/orocos) so that lxrt semaphores are 
not destroyed (see /proc/rtai/RTAI Names) after the application finishes. Is 
this the case in your app ? It could be that it is rtai 3.0 specific...

>
> Have you ever had this problem? We have read about HMIConsoleOutput that
> "It should not be used in hard realtime programs", have you written this
> because of that problem?

The HMI's run together with the execution extension of the control kernel you 
are using. If the HMIOutput prints something, this is done right after the 
control loop. Therefore, the std::cout is not 'good' in the Zero[Time|
Latency]Thread under LXRT It will switch you back to soft realtime (wich 
normally does not cause a crash). If you replace the std::cout with 
rtos_printf() and include <os/fosi.h> it is again allowed, But we know that 
RTAI crashes if to much rt_printk's are done after each other :-(

If it happens again, please send the output of "/proc/rtai/scheduler" and 
"/proc/rtai/RTAI Names" to the list so that I have more details.

>
>
> Moreover, we have read:
>
> "If the ReportingExtension is used, you can track the changes in another
> terminal window."
>
> How can we do this? We would like to see the Report in a terminal window
> and give commands in another terminal window.

what I do is : modify the xxx_reporting.cpf file so that :
    <simple name="ReportFile" type="string">
        <description>The file to write the reports to.
        </description>
        <value>results.txt</value>
    </simple>
    <simple name="WriteToStdOut" type="boolean">
        <description>True if the report needs to be written to standard 
output.
        </description>
        <value>0</value>
    </simple>
    <simple name="WriteToFile" type="boolean">
        <description>True if the report needs to be written to a file.
        </description>
        <value>1</value>
    </simple>

start the program in one console. Open another one, and do :

tail -f results.txt

I have developed the 'index' operator for the next version meaning you can 
write now :

var double6d d6 = double6d(0.0)
set d6[0] = 3.14
var double x = d6[0]

cool, heh ? This opens the way to an 'array' type, which would translate to a 
vector<double> in the code...

Peter
-- 
------------------------------------------------------------------------
Peter Soetens, Research Assistent                  http://www.orocos.org
Katholieke Universiteit Leuven
Division Production Engineering,                      tel. +32 16 322773
Machine Design and Automation                         fax. +32 16 322987
Celestijnenlaan 300B                   [email protected]
B-3001 Leuven Belgium                 http://www.mech.kuleuven.ac.be/pma
------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.