Hmi question
"Andrea Consonni" <[email protected]>
| Newsgroups | gmane.science.robotics.orocos.user |
|---|---|
| Message-ID | <[email protected]> |
>> 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... We think so because using 'dmesg' command we had error about lxrt semaphores. Now we are using RTAI 24.1.12. >> >> 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 :-( We think that we have resolved our problem deleting every "std::cout"s or changing them into "rt_std::cout"s in each our component and in your HMIConsoleOutput.hpp. >> 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 Ok, we have tried it and everything works. We didn't know tail command, thanks. > 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... Very good job! We think that this could be useful in several applications. Regard, Andrea & Stefano