-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Musculoskeletal dog creation #402
base: main
Are you sure you want to change the base?
Musculoskeletal dog creation #402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
The Euler-angle free joint is a deal breaker though. We have to undo this and fix the underlying issue.
dm_control/locomotion/walkers/assets/dog_v2/add_torque_actuators.py
Outdated
Show resolved
Hide resolved
dm_control/locomotion/walkers/assets/dog_v2/add_wrapping_geoms.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! As far as I can tell the logic looks good but I added a bunch of small style comments. In general more comments and doc strings would be great as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two main things missing from this PR:
- Add
dog_v2_test
where the model is instantiated and stepped. Look at https://github.com/google-deepmind/dm_control/blob/main/dm_control/locomotion/walkers/cmu_humanoid_test.py - The public API of the module needs to be clear. Are users expected to call
add_markers.add_markers
, etc.? The test will make it a bit clearer for me how to use the module, but also, you should choose the small number of functions that are to be used by the clients, and import them publically into__init__.py
dm_control/locomotion/walkers/assets/dog_v2/add_wrapping_geoms.py
Outdated
Show resolved
Hide resolved
b74b233
to
00b1761
Compare
The review is showing a bunch of unrelated changes from the main dm_control. I think you somehow folded them into your commit. Could you pull and rebase your fork so that only your changes are in your commit? i.e. in https://github.com/vittorione94/dm_control/tree/musculoskeletal_dog_creation, I see:
Plus there's one unresolved conversation from me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to import this and encountered several issues:
- A bunch of files are missing the standard copyright header. Make sure to make the year 2024 for new files.
- The standard dm_control tests are failing because the existing dog doesn't load because you deleted/moved
dog_assets/dog_skin.skn
. Please make sure the existing tests pass. - Please make sure all code is wrapped to 80 columns.
- Added some specific issues our linter found in specific lines.
- Please sync to HEAD.
arma = physics.bind(j).armature[0] | ||
# Print torque actuators stuff | ||
if not use_muscles: | ||
joint_acts = [model.find("actuator", j.name) for j in actuated_joints] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable 'actuated_joints' is possibly uninitialized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actuated_joints is definitely intialized if we're not using muscles. The build_dog script creates an actuated model (either with torque joints or tendons).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not my opinion, this is what the static code checker is saying 🤷
I can try and import again and see if I get complaints...
muscle.ctrllimited = True | ||
muscle.ctrlrange = [0.0, 1.0] | ||
if lengthrange_from_joints: | ||
muscle.lengthrange = [vector_min[tend_idx], vector_max[tend_idx]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable 'vector_min' and 'vector_max' are possibly uninitialized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if lengthrange_from_joints is true then those are definitely intialized no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not my opinion, this is what the static code checker is saying 🤷
I can try and import again and see if I get complaints...
As per title