Open MarcoMagriDev opened 10 months ago
I don't know what could cause this. I'd try not to use linux clock though, as Xenomai has its own wrappers. XBot::chrono::steady_clock
provides an API for this.
Unfortunately I don't think the issue is related with the way in which execution time is measured since even If I leave only my_test_function()
in the code the execution time difference can be noticed by the robot behavior and from the bar next to the plugin in the xbot2-gui.
I noticed this using a different function that normally takes more, like ~200 micros (in a non patched PC or under schedule: other
) but generates overruns if scheduled using fifo
Can you share the content of this function? Have you seen this behavior only with this specific function?
Hi,
I am encountering a strange behavior in the execution time of a function if the thread in which the function is run is scheduled using fifo.
Setup description
my_library
) in which i have a function defined (let's call itmy_test_function
)my_plugin
) that is includingmy_library
and runs the functionmy_test_function
in the update loop (the thread used by this plugin isrt_main
)Problem description
If the scheduling type of the thread in which the plugins runs is set to
fifo
the execution time result~100 micros
. If instead the scheduling type is set toother
the execution time result in~5 micros
(same execution time that i get on other PCs)Note: no rebuild is performed between the change of scheduling type so the difference of behavior must be introduced by this setting
@EdoardoRomiti @alaurenzi have you ever encountered a similar problem? have you any idea how to solve this?