diff --git a/fancy_gym/envs/mujoco/table_tennis/__init__.py b/fancy_gym/envs/mujoco/table_tennis/__init__.py
new file mode 100644
index 0000000..989b5a9
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/__init__.py
@@ -0,0 +1 @@
+from .mp_wrapper import MPWrapper
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/base_link_convex.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/base_link_convex.stl
new file mode 100755
index 0000000..133b112
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/base_link_convex.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/base_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/base_link_fine.stl
new file mode 100755
index 0000000..047e9df
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/base_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_dist_link_convex.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_dist_link_convex.stl
new file mode 100644
index 0000000..3b05c27
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_dist_link_convex.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_dist_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_dist_link_fine.stl
new file mode 100644
index 0000000..5ff94a2
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_dist_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_med_link_convex.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_med_link_convex.stl
new file mode 100644
index 0000000..c548448
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_med_link_convex.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_med_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_med_link_fine.stl
new file mode 100644
index 0000000..495160d
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_med_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p1.stl
new file mode 100644
index 0000000..b4bb322
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p2.stl
new file mode 100644
index 0000000..7b2f001
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p3.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p3.stl
new file mode 100644
index 0000000..f05174e
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_convex_decomposition_p3.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_fine.stl
new file mode 100644
index 0000000..eb252d9
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_finger_prox_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_fine.stl
new file mode 100644
index 0000000..0a986fa
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p1.stl
new file mode 100644
index 0000000..c039f0d
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p2.stl
new file mode 100644
index 0000000..250acaf
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p3.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p3.stl
new file mode 100644
index 0000000..993d0f7
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p3.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p4.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p4.stl
new file mode 100644
index 0000000..8448a3f
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/bhand_palm_link_convex_decomposition_p4.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup.stl
new file mode 100644
index 0000000..bc34058
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split1.stl
new file mode 100644
index 0000000..c80aa61
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split10.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split10.stl
new file mode 100644
index 0000000..bd5708b
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split10.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split11.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split11.stl
new file mode 100644
index 0000000..ac81da2
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split11.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split12.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split12.stl
new file mode 100644
index 0000000..a18e96e
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split12.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split13.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split13.stl
new file mode 100644
index 0000000..f0e5832
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split13.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split14.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split14.stl
new file mode 100644
index 0000000..41a3e94
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split14.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split15.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split15.stl
new file mode 100644
index 0000000..7a26643
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split15.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split16.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split16.stl
new file mode 100644
index 0000000..155b24e
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split16.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split17.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split17.stl
new file mode 100644
index 0000000..2fe8d95
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split17.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split18.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split18.stl
new file mode 100644
index 0000000..f5287b2
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split18.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split2.stl
new file mode 100644
index 0000000..5c1e50c
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split3.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split3.stl
new file mode 100644
index 0000000..ef6d547
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split3.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split4.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split4.stl
new file mode 100644
index 0000000..5476296
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split4.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split5.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split5.stl
new file mode 100644
index 0000000..ccfcd42
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split5.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split6.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split6.stl
new file mode 100644
index 0000000..72d6287
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split6.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split7.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split7.stl
new file mode 100644
index 0000000..d4918f2
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split7.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split8.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split8.stl
new file mode 100644
index 0000000..8a0cd84
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split8.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split9.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split9.stl
new file mode 100644
index 0000000..4281a69
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/cup_split9.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/elbow_link_convex.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/elbow_link_convex.stl
new file mode 100755
index 0000000..b34963d
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/elbow_link_convex.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/elbow_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/elbow_link_fine.stl
new file mode 100755
index 0000000..f6a1515
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/elbow_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_convex_decomposition_p1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_convex_decomposition_p1.stl
new file mode 100755
index 0000000..e6aa6b6
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_convex_decomposition_p1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_convex_decomposition_p2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_convex_decomposition_p2.stl
new file mode 100755
index 0000000..667902e
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_convex_decomposition_p2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_fine.stl
new file mode 100755
index 0000000..ed66bbb
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/forearm_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p1.stl
new file mode 100755
index 0000000..aba957d
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p2.stl
new file mode 100755
index 0000000..5cca6a9
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p3.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p3.stl
new file mode 100755
index 0000000..3343e27
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_convex_decomposition_p3.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_fine.stl
new file mode 100755
index 0000000..ae505fd
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_pitch_link_convex.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_pitch_link_convex.stl
new file mode 100755
index 0000000..c36cfec
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_pitch_link_convex.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_pitch_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_pitch_link_fine.stl
new file mode 100755
index 0000000..dc633c4
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/shoulder_pitch_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_convex_decomposition_p1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_convex_decomposition_p1.stl
new file mode 100755
index 0000000..82d0093
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_convex_decomposition_p1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_convex_decomposition_p2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_convex_decomposition_p2.stl
new file mode 100755
index 0000000..7fd5a55
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_convex_decomposition_p2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_fine.stl
new file mode 100755
index 0000000..76353ae
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/upper_arm_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_palm_link_convex.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_palm_link_convex.stl
new file mode 100755
index 0000000..a0386f6
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_palm_link_convex.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_palm_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_palm_link_fine.stl
new file mode 100755
index 0000000..f6b41ad
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_palm_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p1.stl
new file mode 100644
index 0000000..c36f88f
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p2.stl
new file mode 100644
index 0000000..d00cac1
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p3.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p3.stl
new file mode 100755
index 0000000..34d1d8b
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_convex_decomposition_p3.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_fine.stl
new file mode 100644
index 0000000..13d2f73
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_pitch_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_convex_decomposition_p1.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_convex_decomposition_p1.stl
new file mode 100755
index 0000000..06e857f
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_convex_decomposition_p1.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_convex_decomposition_p2.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_convex_decomposition_p2.stl
new file mode 100755
index 0000000..48e1bb1
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_convex_decomposition_p2.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_fine.stl b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_fine.stl
new file mode 100644
index 0000000..0d95239
Binary files /dev/null and b/fancy_gym/envs/mujoco/table_tennis/assets/meshes/wam/wrist_yaw_link_fine.stl differ
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_7_motor_actuator.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_7_motor_actuator.xml
new file mode 100644
index 0000000..dcadc5c
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_7_motor_actuator.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_barrett_wam_7dof_right.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_barrett_wam_7dof_right.xml
new file mode 100644
index 0000000..28580b9
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_barrett_wam_7dof_right.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_free_ball.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_free_ball.xml
new file mode 100644
index 0000000..3bbd964
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_free_ball.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_table.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_table.xml
new file mode 100644
index 0000000..c313489
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_table.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_target_ball.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_target_ball.xml
new file mode 100644
index 0000000..feb9125
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/include_target_ball.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/right_arm_actuator.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/right_arm_actuator.xml
new file mode 100644
index 0000000..dfa6924
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/right_arm_actuator.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/shared.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/shared.xml
new file mode 100644
index 0000000..e349992
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/shared.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/assets/xml/table_tennis_env.xml b/fancy_gym/envs/mujoco/table_tennis/assets/xml/table_tennis_env.xml
new file mode 100644
index 0000000..afacf37
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/assets/xml/table_tennis_env.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/mp_wrapper.py b/fancy_gym/envs/mujoco/table_tennis/mp_wrapper.py
new file mode 100644
index 0000000..218cb97
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/mp_wrapper.py
@@ -0,0 +1,29 @@
+from typing import Union, Tuple
+
+import numpy as np
+
+from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
+
+
+class MPWrapper(RawInterfaceWrapper):
+
+ # Random x goal + random init pos
+ @property
+ def context_mask(self):
+ return np.hstack([
+ [False] * 7, # joints position
+ [False] * 7, # joints velocity
+ [False] * 3, # position of box
+ [False] * 4, # orientation of box
+ [True] * 3, # position of target
+ [True] * 4, # orientation of target
+ # [True] * 1, # time
+ ])
+
+ @property
+ def current_pos(self) -> Union[float, int, np.ndarray, Tuple]:
+ return self.data.qpos[:7].copy()
+
+ @property
+ def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
+ return self.data.qvel[:7].copy()
\ No newline at end of file
diff --git a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py
new file mode 100644
index 0000000..86ce595
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py
@@ -0,0 +1,85 @@
+import os
+
+import numpy as np
+from gym import utils, spaces
+from gym.envs.mujoco import MujocoEnv
+
+import mujoco
+
+MAX_EPISODE_STEPS_TABLE_TENNIS = 250
+
+CONTEXT_BOUNDS_2DIMS = np.array([[-1.2, -0.6], [-0.2, 0.0]])
+CONTEXT_BOUNDS_4DIMS = np.array([[-1.2, -0.6, -1.0, -0.65],
+ [-0.2, 0.6, -0.2, 0.65]])
+
+
+class TableTennisEnv(MujocoEnv, utils.EzPickle):
+ """
+ 7 DoF table tennis environment
+ """
+
+ def __init__(self, frame_skip: int = 4):
+ utils.EzPickle.__init__(**locals())
+ self._steps = 0
+
+ self.hit_ball = False
+ self.ball_land_on_table = False
+ self._id_set = False
+ MujocoEnv.__init__(self,
+ model_path=os.path.join(os.path.dirname(__file__), "assets", "xml", "table_tennis_env.xml"),
+ frame_skip=frame_skip,
+ mujoco_bindings="mujoco")
+ self.action_space = spaces.Box(low=-1, high=1, shape=(7,), dtype=np.float32)
+
+ def _set_ids(self):
+ self._floor_id = self.model.geom("floor").bodyid[0]
+ self._ball_id = self.model.geom("target_ball_contact").bodyid[0]
+ self._bat_front_id = self.model.geom("bat").bodyid[0]
+ self._bat_back_id = self.model.geom("bat_back").bodyid[0]
+ self._table_id = self.model.geom("table_tennis_table").bodyid[0]
+ self._id_set = True
+
+ def step(self, action):
+ if not self._id_set:
+ self._set_ids()
+
+ unstable_simulation = False
+
+ try:
+ self.do_simulation(action, self.frame_skip)
+ except Exception as e:
+ print("Simulation get unstable return with MujocoException: ", e)
+ unstable_simulation = True
+
+ self._steps += 1
+ episode_end = True if self._steps >= MAX_EPISODE_STEPS_TABLE_TENNIS else False
+
+ obs = self._get_obs()
+
+ return obs, 0., False, {}
+
+ def _contact_checker(self, id_1, id_2):
+ for coni in range(0, self.data.ncon):
+ con = self.data.contact[coni]
+ if (con.geom1 == id_1 and con.geom2 == id_2) or (con.geom1 == id_2 and con.geom2 == id_1):
+ return True
+ return False
+
+ def reset_model(self):
+ self._steps = 0
+ return self._get_obs()
+
+ def _get_obs(self):
+ obs = np.concatenate([
+ self.data.qpos.flat[:7],
+ self.data.qvel.flat[:7],
+ ])
+ return obs
+
+
+if __name__ == "__main__":
+ env = TableTennisEnv()
+ env.reset()
+ while True:
+ env.render("human")
+ env.step(env.action_space.sample())
diff --git a/fancy_gym/envs/mujoco/table_tennis/table_tennis_utils.py b/fancy_gym/envs/mujoco/table_tennis/table_tennis_utils.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_utils.py
@@ -0,0 +1 @@
+