-
Notifications
You must be signed in to change notification settings - Fork 19
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
Urdf to mjcf #34
Urdf to mjcf #34
Conversation
…ble with 3.8 python
sim/scripts/create_mjcf.py
Outdated
new_root_body.append(item) | ||
# # Add joints to all the movement of the base | ||
# Define the joints as individual elements | ||
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.
use free joint since it's a default mujoco logic
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.
addressed
sim/scripts/create_mjcf.py
Outdated
|
||
if add_reference_position: | ||
if joint_name in default_standing.keys(): | ||
joint.set("ref", str(default_standing[joint_name])) |
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.
We don't use keyframe then?
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.
gonna remove this - it seems like adding a reference position doesn't do anything
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.
actually i am going to make it so that it manually sets the keypose object based on a hyperparameter and the default positiosn from joints.py
…reejoint, example fixed urdf and xml
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.
See my comments but otherwise lgtm.
sim/scripts/create_fixed_torso.py
Outdated
# Save the modified URDF to a new file | ||
tree.write("sim/stompy_legs/robot_fixed.urdf") | ||
|
||
|
||
if __name__ == "__main__": | ||
update_urdf() | ||
|
||
path = Path("sim/stompy_legs/robot.urdf") |
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.
move this to a separate file that will use create_mjcf and create_urdf
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.
fixed
# Locate actual root body inside of worldbody | ||
root_body = worldbody.find(".//body") | ||
# Make position and orientation of the root body | ||
root_body.set("pos", "0 0 0") |
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 we use freejoint this will need to be changed to 0 0 HEIGHT probably
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.
we set height in the default keypose - i think its better that way since we place the robot at 0 0 HEIGHT in isaac as well so its consistent
Updating urdf to mjcf to have all the components in ksim, as well as updating some stuff to be python 3.8 compatible