ros2_control - rolling
Loading...
Searching...
No Matches
test_urdf_to_mujoco_utils.TestUrdfToMjcfUtils Class Reference
Inheritance diagram for test_urdf_to_mujoco_utils.TestUrdfToMjcfUtils:
Collaboration diagram for test_urdf_to_mujoco_utils.TestUrdfToMjcfUtils:

Public Member Functions

 test_multiply_quaternion_identity (self)
 test_multiply_quaternion_90deg_rotation (self)
 test_euler_to_quaternion_identity (self)
 test_euler_to_quaternion_90deg_roll (self)
 test_euler_to_quaternion_90deg_pitch (self)
 test_euler_to_quaternion_90deg_yaw (self)
 test_remove_tag_basic (self)
 test_remove_tag_nonexistent (self)
 test_remove_tag_multiple (self)
 test_add_mujoco_info_basic (self)
 test_add_mujoco_info_no_publish_topic (self)
 test_add_mujoco_info_with_publish_topic (self)
 test_add_mujoco_info_no_fuse (self)
 test_get_images_from_dae_basic (self)
 test_get_images_from_dae_multiple_images (self)
 test_get_images_from_dae_no_images (self)
 test_get_images_from_dae_relative_path (self)
 test_rename_material_textures_basic (self)
 test_rename_material_textures_no_match (self)
 test_set_up_axis_to_z_up_create (self)
 test_set_up_axis_to_z_up_update (self)
 test_replace_package_names_minimal (self)
 test_replace_package_names_basic (self, mock_get_package)
 test_replace_package_names_no_package (self)
 test_replace_package_names_file_prefix_removed (self)
 test_replace_package_names_multiple_packages (self, mock_get_package)
 test_update_obj_assets_no_assets (self)
 test_update_obj_assets_no_matching_dirs (self)
 test_update_obj_assets_expands_collision_only (self)
 test_update_obj_assets_plain_mesh_tints_collision_keeps_visual_material (self)
 test_update_obj_assets_visual_only_untouched (self)
 test_update_obj_assets_shared_keeps_visual_expands_collision (self)
 test_update_obj_assets_expands_scaled_sibling (self)
 test_update_non_obj_assets_visual_geom (self)
 test_update_non_obj_assets_collision_geom (self)
 test_ensure_collision_material_adds_when_referenced (self)
 test_ensure_collision_material_noop_when_unreferenced (self)
 test_ensure_collision_material_keeps_existing (self)
 test_update_non_obj_assets_visual_and_collision (self)
 test_update_non_obj_assets_skips_classified (self)
 test_update_non_obj_assets_visual_rgba_from_mesh_info (self)
 test_add_mujoco_inputs_both_none (self)
 test_add_mujoco_inputs_with_raw_inputs (self)
 test_add_mujoco_inputs_with_scene_inputs (self)
 test_add_mujoco_inputs_both_inputs (self)
 test_get_processed_mujoco_inputs_none_element (self)
 test_get_processed_mujoco_inputs_decompose_mesh (self)
 test_get_processed_mujoco_inputs_decompose_mesh_default_threshold (self)
 test_get_processed_mujoco_inputs_camera (self)
 test_get_processed_mujoco_inputs_lidar (self)
 test_get_processed_mujoco_inputs_lidar_zero_angle_increment (self)
 test_get_processed_mujoco_inputs_modify_element (self)
 test_get_processed_mujoco_inputs_modify_element_geom (self)
 test_get_processed_mujoco_inputs_modify_element_missing_type (self)
 test_get_processed_mujoco_inputs_modify_element_missing_name (self)
 test_get_processed_mujoco_inputs_modify_geom_element_missing_mesh (self)
 test_get_processed_mujoco_inputs_modify_geom_element_missing_class (self)
 test_get_processed_mujoco_inputs_replace_collision (self)
 test_get_processed_mujoco_inputs_replace_collision_multiple_geoms (self)
 test_get_processed_mujoco_inputs_replace_collision_nested_body (self)
 test_get_processed_mujoco_inputs_replace_collision_missing_link (self)
 test_get_processed_mujoco_inputs_replace_collision_no_children (self)
 test_get_processed_mujoco_inputs_replace_collision_duplicate_link_raises (self)
 test_get_processed_mujoco_inputs_replace_collision_urdf_stage (self)
 test_get_processed_mujoco_inputs_replace_collision_explicit_mjcf_stage (self)
 test_get_processed_mujoco_inputs_replace_collision_invalid_stage_raises (self)
 test_get_processed_mujoco_inputs_replace_collision_wrong_children_for_stage_raises (self)
 test_get_processed_mujoco_inputs_replace_collision_same_link_both_stages_raises (self)
 test_get_processed_mujoco_inputs_multiple_elements (self)
 test_write_mujoco_scene_none (self)
 test_write_mujoco_scene_with_scene_tag (self)
 test_write_mujoco_scene_with_muojco_inputs (self)
 test_write_mujoco_scene_with_multiple_elements (self)
 test_add_urdf_free_joint_basic (self)
 test_add_urdf_free_joint_world_root (self)
 test_add_urdf_free_joint_preserves_existing_content (self)
 test_add_urdf_free_joint_origin_attributes (self)
 test_get_xml_from_file_basic (self)
 test_get_xml_from_file_nonexistent (self)
 test_add_modifiers_basic (self)
 test_add_modifiers_multiple_elements (self)
 test_add_modifiers_overwrite_existing (self)
 test_add_modifiers_empty_dict (self)
 test_add_replaced_collisions_defaults_class (self)
 test_add_replaced_collisions_preserves_explicit_class (self)
 test_add_replaced_collisions_multiple_geoms (self)
 test_add_replaced_collisions_nested_body (self)
 test_add_replaced_collisions_unmatched_link_raises (self)
 test_add_replaced_collisions_fused_link_attaches_to_parent (self)
 test_add_replaced_collisions_fused_link_rotated_pose (self)
 test_add_replaced_collisions_root_fused_into_world_raises (self)
 test_add_replaced_collisions_empty_dict (self)
 test_add_replaced_collisions_multiple_geoms_and_multiple_nested_bodies (self)
 test_add_lidar_from_sites_basic (self)
 test_add_lidar_from_sites_no_matching_sites (self)
 test_add_lidar_from_sites_removes_min_angle (self)
 test_add_cameras_from_sites_check_attributes (self)
 test_add_cameras_from_sites_no_matching_sites (self)
 test_add_links_as_sites_basic (self)
 test_add_links_as_sites_with_world_root (self)
 test_add_links_as_sites_no_free_joint (self)
 test_get_urdf_transforms_single_link (self)
 test_get_urdf_transforms_multiple_links (self)
 test_get_urdf_transforms_with_fixed_joint (self)
 test_get_urdf_transforms_with_world_root (self)
 test_add_free_joint_with_virtual_base_joint (self)
 test_add_free_joint_world_root (self)
 test_add_free_joint_custom_name (self)
 test_parse_inputs_xml_none (self)
 test_parse_inputs_xml_standalone (self)
 test_parse_inputs_xml_in_urdf (self)
 test_parse_inputs_xml_invalid_root (self)
 test_parse_inputs_xml_duplicate_raw_inputs_standalone (self)
 test_parse_inputs_xml_duplicate_processed_inputs_standalone (self)
 test_parse_inputs_xml_duplicate_raw_inputs_in_urdf (self)
 test_parse_inputs_xml_duplicate_processed_inputs_in_urdf (self)
 test_parse_scene_xml_none (self)
 test_parse_scene_xml_standalone_mujoco (self)
 test_parse_scene_xml_in_urdf (self)
 test_parse_scene_xml_urdf_without_scene (self)
 test_parse_scene_xml_invalid_root (self)
 test_replace_urdf_collisions_replaces_existing (self)
 test_replace_urdf_collisions_adds_when_none (self)
 test_replace_urdf_collisions_unknown_link_raises (self)
 test_replace_urdf_collisions_empty_dict (self)
 test_add_missing_collisions_adds_from_visual (self)
 test_add_missing_collisions_keeps_existing (self)
 test_add_missing_collisions_no_visual (self)
 test_add_missing_collisions_multiple_visuals (self)
 test_add_missing_collisions_exclude_links_removes_existing_and_skips_synthesis (self)
 test_add_missing_collisions_exclude_links_skips_synthesis_for_visual_only_link (self)
 test_add_missing_collisions_exclude_links_leaves_other_links (self)
 test_add_missing_collisions_exclude_links_none_is_noop (self)
 test_extract_mesh_info_basic (self)
 test_extract_mesh_info_with_material_color (self)
 test_extract_mesh_info_with_scale (self)
 test_extract_mesh_info_no_mesh_geometry (self)
 test_extract_mesh_info_distinct_collision_mesh (self)
 test_extract_mesh_info_shared_collision_mesh (self)
 test_extract_mesh_info_same_file_different_scale_stays_distinct (self)
 test_extract_mesh_info_same_file_different_color_stays_distinct (self)
 test_extract_mesh_info_collision_shares_colored_visual_mesh (self)
 test_extract_mesh_info_renames_integer_formatted_scale (self)
 test_extract_mesh_info_renames_collision_sharing_disambiguated_colored_visual (self)
 test_extract_mesh_info_with_decompose_dict (self)
 test_extract_mesh_different_threshold (self)
 test_extract_mesh_visual_pre_generated (self)
 test_extract_mesh_collision_direct_pre_generated (self)
 test_copy_pre_generated_meshes_collision_direct (self)
 test_copy_pre_generated_meshes_decomposed (self)
 test_copy_pre_generated_meshes_decomposed_not_empty_metadata (self)
 test_copy_pre_generated_meshes_visual (self)
 test_copy_pre_generated_meshes_not_pre_generated (self)
 test_extract_mesh_info_identical_collision_collapses (self)
 test_decompose_threshold_collision_named (self)
 test_decompose_threshold_visual_only (self)
 test_decompose_threshold_not_named (self)
 test_decompose_threshold_by_source_stem (self)
 test_mesh_home (self)
 test_resolve_pregenerated_no_asset_dir (self)
 test_resolve_pregenerated_visual_hit (self)
 test_resolve_pregenerated_probes_home_only (self)
 test_resolve_pregenerated_decomposed_requires_metadata (self)
 test_resolve_pregenerated_renamed_entry (self)
 test_ensure_default_classes_adds_all (self)
 test_ensure_default_classes_keeps_existing (self)
 test_ensure_default_classes_noop_when_present (self)

Static Public Attributes

str FUSED_URDF
str FUSED_MJCF
str REPLACE_URDF

Protected Member Functions

 _write_decomposed_mjcf (self, tmpdir, name)
 _write_plain_mjcf (self, tmpdir, name)
 _parse_processed (self, inner_xml)
 _link (self, xml_string, name)
 _urdf_fragment (self, inner_xml)

Member Data Documentation

◆ FUSED_MJCF

str test_urdf_to_mujoco_utils.TestUrdfToMjcfUtils.FUSED_MJCF
static
Initial value:
= """<mujoco model="t">
<compiler angle="radian" meshdir="assets/" texturedir="assets/"/>
<worldbody>
<body name="arm_link">
<inertial pos="0.5 0 0" quat="0.5 0.5 0.5 0.5" mass="2" diaginertia="2.5 2.5 2"/>
<joint name="j"/>
</body>
</worldbody>
</mujoco>"""

◆ FUSED_URDF

str test_urdf_to_mujoco_utils.TestUrdfToMjcfUtils.FUSED_URDF
static
Initial value:
= """<robot name="t">
<link name="base_link"/><link name="arm_link"/><link name="child_link"/>
<joint name="j" type="continuous">
<parent link="base_link"/><child link="arm_link"/><axis xyz="0 0 1"/>
</joint>
<joint name="fixed" type="fixed">
<parent link="arm_link"/><child link="child_link"/>
<origin xyz="1 0 0" rpy="0 0 1.5707963267948966"/>
</joint>
</robot>"""

◆ REPLACE_URDF

test_urdf_to_mujoco_utils.TestUrdfToMjcfUtils.REPLACE_URDF
static
Initial value:
= """<?xml version="1.0"?>
<robot name="test_robot">
<link name="arm">
<visual><geometry><mesh filename="arm.stl"/></geometry></visual>
<collision><geometry><mesh filename="arm.stl"/></geometry></collision>
<collision><geometry><mesh filename="arm_extra.stl"/></geometry></collision>
</link>
<link name="hand">
<visual><geometry><mesh filename="hand.stl"/></geometry></visual>
</link>
</robot>"""

The documentation for this class was generated from the following file: