Skip to content
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

Merged
merged 13 commits into from
Jul 23, 2024
Merged

Urdf to mjcf #34

merged 13 commits into from
Jul 23, 2024

Conversation

wuallenwu
Copy link
Contributor

Updating urdf to mjcf to have all the components in ksim, as well as updating some stuff to be python 3.8 compatible

@wuallenwu wuallenwu requested a review from budzianowski July 23, 2024 20:41
new_root_body.append(item)
# # Add joints to all the movement of the base
# Define the joints as individual elements
joints = [
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed


if add_reference_position:
if joint_name in default_standing.keys():
joint.set("ref", str(default_standing[joint_name]))
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Collaborator

@budzianowski budzianowski left a 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.

# 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")
Copy link
Collaborator

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

Copy link
Contributor Author

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")
Copy link
Collaborator

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

Copy link
Contributor Author

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

@wuallenwu wuallenwu merged commit a96cd5e into master Jul 23, 2024
1 check passed
@wuallenwu wuallenwu deleted the urdf-to-mjcf branch July 23, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants