fix: 修复mujoco仿真里左臂剪刀安装位置与实际位置不同
This commit is contained in:
@@ -514,7 +514,7 @@
|
||||
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001" />
|
||||
</inertial>
|
||||
<visual>
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<origin xyz="0 0 0" rpy="0 0 -1.5708" />
|
||||
<geometry>
|
||||
<mesh filename="meshes/scissor.stl" scale="1 1 1" />
|
||||
</geometry>
|
||||
@@ -523,7 +523,7 @@
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<origin xyz="0 0 0" rpy="0 0 -1.5708" />
|
||||
<geometry>
|
||||
<mesh filename="meshes/scissor.stl" scale="1 1 1" />
|
||||
</geometry>
|
||||
|
||||
@@ -95,6 +95,17 @@ def test_dual_urdf_has_expected_joints_meshes_and_tcp_frames() -> None:
|
||||
assert joint.find("origin").attrib["xyz"] == xyz
|
||||
|
||||
|
||||
def test_left_scissor_mesh_matches_physical_mount_rotation() -> None:
|
||||
root = ElementTree.parse(DUAL_URDF_PATH).getroot()
|
||||
link = root.find("link[@name='scissor_scissor_link']")
|
||||
|
||||
assert link is not None
|
||||
assert link.find("visual/origin").attrib["rpy"] == "0 0 -1.5708"
|
||||
assert link.find("collision/origin").attrib["rpy"] == "0 0 -1.5708"
|
||||
tcp_joint = root.find("joint[@name='scissor_scissor_tcp_fixed']")
|
||||
assert tcp_joint.find("origin").attrib["rpy"] == "0 0 0"
|
||||
|
||||
|
||||
def _dual_placo_solver(
|
||||
arm: str,
|
||||
joint_degrees: list[float],
|
||||
|
||||
Reference in New Issue
Block a user