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

fix the setup for sim2sim #1

Merged
merged 7 commits into from
Oct 22, 2024
Merged

fix the setup for sim2sim #1

merged 7 commits into from
Oct 22, 2024

Conversation

budzianowski
Copy link
Contributor

@budzianowski budzianowski commented Oct 16, 2024

  • add default position
  • add force control flag
  • add geom visual logic
  • add e2e test

@budzianowski budzianowski changed the title fix the frc ranges for sim2sim fix the setup for sim2sim Oct 17, 2024
Comment on lines +24 to +43
@pytest.mark.slow
def test_conversion_no_frc_limit(tmpdir: Path) -> None:
urdf_path = Path(__file__).parent / "sample" / "robot.urdf"
mjcf_path = tmpdir / "robot.mjcf"

convert_urdf_to_mjcf(
urdf_path=urdf_path,
mjcf_path=mjcf_path,
no_frc_limit=True,
copy_meshes=False,
default_position="0.0 0.0 0.63 0.0 0.0 0.0 1.0 -0.23 0.0 0.0 0.441 -0.258 -0.23 0.0 0.0 0.441 -0.258",
)

# Compare the outputted MJCF with the expected XML
expected_mjcf_path = Path(__file__).parent / "sample" / "robot_test.xml"
with open(mjcf_path, "r") as output_file, open(expected_mjcf_path, "r") as expected_file:
output_content = output_file.read()
expected_content = expected_file.read()

assert output_content == expected_content, "The output MJCF does not match the expected XML."
Copy link
Member

Choose a reason for hiding this comment

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

nice, good to add this test

@codekansas codekansas merged commit 7e4e39b into master Oct 22, 2024
1 check passed
@codekansas codekansas deleted the fix_frc_range branch October 23, 2024 08:04
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