Skip to content

Commit 6adef17

Browse files
ndunkelb-nasasaikishor
authored andcommitted
fixing the free joint conversion to include mass and inertial properties for the root body
1 parent 8ec5d74 commit 6adef17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/make_mjcf_from_robot_description.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ def fix_mujoco_description(
950950
dom = minidom.parse(full_filepath)
951951

952952
if request_add_free_joint:
953-
dom = add_free_joint(dom, urdf)
953+
dom = fix_free_joint(dom, urdf)
954954

955955
# Update and add the new fixed assets
956956
dom = update_obj_assets(dom, output_filepath, mesh_info_dict)
@@ -1189,6 +1189,10 @@ def main(args=None):
11891189
# Grab the output directory and ensure it ends with '/'
11901190
output_filepath = os.path.join(parsed_args.output, "")
11911191

1192+
# Add a free joint to the urdf
1193+
if request_add_free_joint:
1194+
urdf = add_urdf_free_joint(urdf)
1195+
11921196
# Add required mujoco tags to the starting URDF
11931197
xml_data = add_mujoco_info(urdf)
11941198

0 commit comments

Comments
 (0)