Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Fast way to read entire frame tree

#7
(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.


Messages In This Thread
Fast way to read entire frame tree - byrshanor- 10-12-2022, 07:32 PM
RE: Fast way to read entire frame tree - bySam- 10-14-2022, 12:29 AM
RE: Fast way to read entire frame tree - byrshanor- 10-14-2022, 03:13 PM



Users browsing this thread:
1 Guest(s)