maxspahn / gym_envs_urdf

URDF environments for gym
https://maxspahn.github.io/gym_envs_urdf/
GNU General Public License v3.0
46 stars 14 forks source link

Revert "Revert "Ft automated extraction joint"" #95

Closed SkyloveQiu closed 2 years ago

SkyloveQiu commented 2 years ago

Reverts maxspahn/gym_envs_urdf#94

lgtm-com[bot] commented 2 years ago

This pull request introduces 1 alert when merging 92f3d4adc545e392ff0d15b14ca48139790bd5b1 into 9b265a44a3c15536131dbabcb1f4b85eb9585a43 - view on LGTM.com

new alerts:

SkyloveQiu commented 2 years ago

The bug is found and a bad solution is found. This will increase the time complexity of get_indexed_joint_info function from O(nlogn) to O(n^2). This will double the time to start simulation.

maxspahn commented 2 years ago

First comment: There are trailing white spaces and trailing indent everywhere in your code. This is also reported by the linter. Secondly, it's better to have a working and slow solution than a fast one that does not work.

SkyloveQiu commented 2 years ago

The pylint reports score of 9.91/10.

SkyloveQiu commented 2 years ago

fixed

maxspahn commented 2 years ago

The loading/resetting of the robots was so slow, because of URDF.load(). By centralizing it, it is only called once. As a consequence the joint id extraction does not add any computational costs to the loading.

lgtm-com[bot] commented 2 years ago

This pull request introduces 3 alerts when merging ddbebdcad11268b16a2f63b613b75a22a949dc58 into 00001beb199e8b1bc654b4380cd96356b52385cc - view on LGTM.com

new alerts:

SkyloveQiu commented 2 years ago

I have run all of the examples, and all of them are working correctly.