UM-ARM-Lab / pytorch_kinematics

Robot kinematics implemented in pytorch
MIT License
447 stars 42 forks source link

get_matrix() function takes around 0.5 second ?! It is an issue for online control. #24

Closed LyuJZ closed 1 year ago

LyuJZ commented 1 year ago

Hi, thanks a lot for sharing this useful package with the community. I am using it for robot online control now. However, I found get_matrix() function takes some time to get the result. Is there any chance to solve this issue?

LemonPi commented 1 year ago

The transform operations are lazily evaluated, so when get_matrix() takes a long time, it is likely due to it being the result of chaining a number of operations. Before retrieving the matrix, can you take a look at what operations are chained? It could be that there are many unnecessary operations.

PeterMitrano commented 1 year ago

@LyuJZ we've just merged some changes that improve the performance. Check it out!