10-14-2022, 03:13 PM
(10-14-2022, 29)Sam Wrote:I'm not sure why you are experiencing such a delay with Pose(). I tried the following code and it's performing well with 50+ items.
Code:items = {}
for item in RDK.ItemList():
items[item] = item.Pose()
Can you use pstats to find the bottleneck?
Could it be that you process items recursively more than once?
Hi Sam,
谢谢你u for the response. I will try to run some more tests on my end.
How fast is the call toitem.Pose? Is the speed of this call in any way a function of number of items in the station? I actually have about 300 items in the station, but ~250 of them are invisible. I have to keep these around due to some robodk issues dynamically loading files with texture in Linux. Basically I create a default station in Windows and just move the objects I want when they are required. That is why I do some recursive call rather than reading every item like you show above. I only care about items that are under thelink.Item(get_roof_frame_name())branch of the tree.