Skip to content

Commit d84517e

Browse files
authored
Merge pull request #17 from NASA-JSC-Robotics/sim_hatch_latch
Add latch to lorge hatch in mujoco sim
2 parents e8235f6 + d05970b commit d84517e

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

clr_imetro_environments/urdf/clr_trainer_multi_hatch_macro.xacro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@
108108
<xacro:property name="external_handle_3" default="true"/>
109109
<xacro:property name="internal_handle_1" default="false"/>
110110
<xacro:property name="internal_handle_2" default="true"/>
111+
<xacro:property name="latch" default="true"/>
111112
<xacro:include filename="$(find hatch_4060)/urdf/hatch_4060.xacro"/>
112113
<xacro:hatch_4060 prefix="lorge/" parent="lorge/hatch_frame"
113114
external_handle_1="${external_handle_1}" external_handle_2="${external_handle_2}" external_handle_3="${external_handle_3}"
114-
internal_handle_1="${internal_handle_1}" internal_handle_2="${internal_handle_2}">
115+
internal_handle_1="${internal_handle_1}" internal_handle_2="${internal_handle_2}" latch="${latch}">
115116
<!-- <origin xyz="${0.678 + 0.012} 0.057 ${0.716 - 0.013}" rpy="0 0 0"/> -->
116117
<origin xyz="0.678 0.057 0.716" rpy="0 0 0"/>
117118
</xacro:hatch_4060>

clr_mujoco_config/description/clr.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,10 @@
612612
<geom mesh="grab_handle_collision_5" rgba="0.7102210154635407 0.26526570669981253 0.9472556119532515 1" class="collision" pos="-0.058 -1.078 0.6957" quat="0.707107 0.707107 0 0"/>
613613
<geom mesh="grab_handle_collision_6" rgba="0.873602737080983 0.610283940837291 0.4222249640481468 1" class="collision" pos="-0.058 -1.078 0.6957" quat="0.707107 0.707107 0 0"/>
614614
<geom mesh="grab_handle_collision_7" rgba="0.1712850611561645 0.8602855438449819 0.9376714912658347 1" class="collision" pos="-0.058 -1.078 0.6957" quat="0.707107 0.707107 0 0"/>
615+
<geom size="0.0127" pos="-0.0341587 -1.22925 0.666224" type="sphere" class="collision"/>
616+
<geom size="0.0127" pos="-0.0341587 -1.22925 0.666224" rgba="1 1 1 0" type="sphere" class="visual"/>
615617
<site name="lorge/hatch_face" pos="0 0 0" quat="1.0 0 0 0"/>
618+
<site name="lorge/hatch_latch" pos="-0.034158681999999996 -1.2292456999999999 0.6662242199999999" quat="1.0 0 0 0"/>
616619
<site name="lorge/right_cal_1_frame" pos="0.0167 0 0" quat="1.0 0 0 0"/>
617620
<site name="lorge/right_cal_2_frame" pos="0 0.0167 0" quat="1.0 0 0 0"/>
618621
<site name="lorge/external_1_grab_handle" pos="-0.07 -0.9016 0.8021" quat="0 0 1.0 0"/>
@@ -628,6 +631,13 @@
628631
<site name="lorge/internal_2_grab_center" pos="0.02269999999999999 -1.078 0.6068" quat="0.7071067811865476 0.7071067811865475 0 0"/>
629632
<site name="lorge/internal_2_grab_touch" pos="0.035399999999999994 -1.078 0.6068" quat="0.7071067811865476 0.7071067811865475 0 0"/>
630633
</body>
634+
<body name="lorge/hatch_latch_catch" pos="2.14892 -0.760758 1.46808">
635+
<inertial pos="0 0 0" mass="0.0671" diaginertia="4.345e-06 4.345e-06 4.345e-06"/>
636+
<joint name="lorge/latch_spring" pos="0 0 0" axis="0 0 -1" type="slide" range="0 0.035" actuatorfrcrange="-1000 1000" limited="true" springref="0.035" stiffness="10000" damping="2" armature="0.001"/>
637+
<geom size="0.03" type="sphere" class="collision"/>
638+
<geom size="0.03" rgba="1 1 1 0" type="sphere" class="visual"/>
639+
<site name="lorge/hatch_latch_catch" pos="0 0 0" quat="1.0 0 0 0"/>
640+
</body>
631641
<body name="bench_lid" pos="-2.10085 1.0466 0.5244" quat="-0.706686 0 0 0.707527">
632642
<inertial pos="0.265226 0.46 0.0319033" quat="0.503331 0.503331 -0.496647 0.496647" mass="9.07185" diaginertia="0.857706 0.643129 0.2211"/>
633643
<joint name="bench_lid_joint" pos="0 0 0" axis="0 -1 0" range="0 1.65806" actuatorfrcrange="-10 10" damping="3" frictionloss="3"/>
@@ -932,6 +942,7 @@
932942
<site name="lorge/hatch_bench" pos="1.40208 -0.801983 -0.002" quat="1.0 0 0 0"/>
933943
<site name="lorge/hatch_inner_frame" pos="1.986409 0.4430170000000001 0.7093" quat="0 0 0 1.0"/>
934944
<site name="lorge/hatch_outer_frame" pos="2.08008 -0.744983 0.714" quat="1.0 0 0 0"/>
945+
<site name="lorge/hatch_latch_spring_anchor" pos="2.1489176 -0.7607581999999999 1.4680752" quat="1.0 0 0 0"/>
935946
<site name="trainer_frame" pos="-2.0992 2.4346 0" quat="0.7066862882126158 0 0 -0.7075270242558058"/>
936947
<site name="trainer_box" pos="-2.0992 2.4346 0" quat="0.7066862882126158 0 0 -0.7075270242558058"/>
937948
<site name="trainer_top" pos="-2.0992 2.4346 1.52" quat="0.7066862882126158 0 0 -0.7075270242558058"/>

clr_mujoco_config/description/mujoco_inputs.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@
161161
<modify_element type="joint" name="finger_1_joint" armature="0.5" frictionloss="5.0" />
162162
<modify_element type="joint" name="finger_2_joint" armature="0.5" frictionloss="5.0" />
163163

164+
<!-- Add joint properties to lorge hatch latch spring joint -->
165+
<modify_element type="joint" name="lorge/latch_spring" limited="true" springref="0.035" stiffness="10000" damping="2" armature="0.001"/>
166+
164167
</processed_inputs>
165168

166169
</mujoco_inputs>

clr_mujoco_config/urdf/clr_xacro.urdf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@
170170
<joint name="lorge/hatch_outer_frame_face_joint">
171171
<state_interface name="position"/>
172172
</joint>
173+
174+
<joint name="lorge/latch_spring">
175+
<state_interface name="position"/>
176+
</joint>
177+
173178
<joint name="lorge/external_rotary_joint">
174179
<state_interface name="position"/>
175180
</joint>

0 commit comments

Comments
 (0)