diff --git a/example_scripts/record/watch_only_record.py b/example_scripts/record_pose/watch_only_record.py similarity index 100% rename from example_scripts/record/watch_only_record.py rename to example_scripts/record_pose/watch_only_record.py diff --git a/example_scripts/record/watch_phone_uarm_record.py b/example_scripts/record_pose/watch_phone_uarm_record.py similarity index 100% rename from example_scripts/record/watch_phone_uarm_record.py rename to example_scripts/record_pose/watch_phone_uarm_record.py diff --git a/experimental_scripts/watch_phone_pocket_nn.py b/experimental_scripts/watch_phone_pocket_lstm.py similarity index 100% rename from experimental_scripts/watch_phone_pocket_nn.py rename to experimental_scripts/watch_phone_pocket_lstm.py diff --git a/experimental_scripts/watch_phone_to_ros.py b/experimental_scripts/watch_phone_to_ros.py index e343d36..b68c18d 100644 --- a/experimental_scripts/watch_phone_to_ros.py +++ b/experimental_scripts/watch_phone_to_ros.py @@ -33,7 +33,7 @@ # left ROS publisher wp2ul = WatchPhoneROS() ul_thread = threading.Thread( - target=wp2ul.stream_loop, + target=wp2ul.processing_loop, args=(left_q,) ) ul_thread.start() diff --git a/setup.cfg b/setup.cfg index 21b2245..9204fde 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = wear_mocap_ape -version = 1.2.0 +version = 1.2.2 author = Fabian Weigend author_email = fweigend@asu.edu description = diff --git a/src/wear_mocap_ape/estimate/watch_phone_uarm.py b/src/wear_mocap_ape/estimate/watch_phone_uarm.py index 2a483d3..49dc4fa 100644 --- a/src/wear_mocap_ape/estimate/watch_phone_uarm.py +++ b/src/wear_mocap_ape/estimate/watch_phone_uarm.py @@ -31,13 +31,6 @@ def __init__(self, # simple lookup for values of interest self.__slp = messaging.WATCH_PHONE_IMU_LOOKUP - # in left hand mode, the arm is stretched along the negative X-axis in T pose - # if not left_hand_mode: - # self._larm_vec[0] = -self._larm_vec[0] - # self._uarm_vec[0] = -self._uarm_vec[0] - # self._uarm_orig = self._uarm_orig * np.array([-1, 1, 1]) # invert x - # self._body_measurements = np.r_[self._larm_vec, self._uarm_vec, self._uarm_orig][np.newaxis, :] - def calibrate_orientation_quats(self, sw_quat: np.array, sw_fwd: np.array, @@ -68,44 +61,6 @@ def parse_row_to_xx(self, row: np.array): if not type(row) is np.array: row = np.array(row) - # # get relevant entries from the row - # if len(row.shape) > 1: - # # get relevant entries from the row - # sw_fwd = np.c_[ - # row[:, self.__slp["sw_forward_w"]], row[:, self.__slp["sw_forward_x"]], - # row[:, self.__slp["sw_forward_y"]], row[:, self.__slp["sw_forward_z"]] - # ] - # sw_rot = np.c_[ - # row[:, self.__slp["sw_rotvec_w"]], row[:, self.__slp["sw_rotvec_x"]], - # row[:, self.__slp["sw_rotvec_y"]], row[:, self.__slp["sw_rotvec_z"]] - # ] - # - # ph_fwd = np.c_[ - # row[:, self.__slp["ph_forward_w"]], row[:, self.__slp["ph_forward_x"]], - # row[:, self.__slp["ph_forward_y"]], row[:, self.__slp["ph_forward_z"]] - # ] - # - # ph_rot = np.c_[ - # row[:, self.__slp["ph_rotvec_w"]], row[:, self.__slp["ph_rotvec_x"]], - # row[:, self.__slp["ph_rotvec_y"]], row[:, self.__slp["ph_rotvec_z"]] - # ] - # - # sw_sensor_dat = np.c_[ - # row[:, self.__slp["sw_dt"]], - # row[:, self.__slp["sw_gyro_x"]], row[:, self.__slp["sw_gyro_y"]], row[:, self.__slp["sw_gyro_z"]], - # row[:, self.__slp["sw_lvel_x"]], row[:, self.__slp["sw_lvel_y"]], row[:, self.__slp["sw_lvel_z"]], - # row[:, self.__slp["sw_lacc_x"]], row[:, self.__slp["sw_lacc_y"]], row[:, self.__slp["sw_lacc_z"]], - # row[:, self.__slp["sw_grav_x"]], row[:, self.__slp["sw_grav_y"]], row[:, self.__slp["sw_grav_z"]] - # ] - # r_pres = row[:, self.__slp["sw_pres"]] - row[:, self.__slp["sw_init_pres"]] - # - # ph_sensor_dat = np.c_[ - # row[:, self.__slp["ph_gyro_x"]], row[:, self.__slp["ph_gyro_y"]], row[:, self.__slp["ph_gyro_z"]], - # row[:, self.__slp["ph_lvel_x"]], row[:, self.__slp["ph_lvel_y"]], row[:, self.__slp["ph_lvel_z"]], - # row[:, self.__slp["ph_lacc_x"]], row[:, self.__slp["ph_lacc_y"]], row[:, self.__slp["ph_lacc_z"]], - # row[:, self.__slp["ph_grav_x"]], row[:, self.__slp["ph_grav_y"]], row[:, self.__slp["ph_grav_z"]] - # ] - # else: sw_fwd = np.array([ row[self.__slp["sw_forward_w"]], row[self.__slp["sw_forward_x"]], row[self.__slp["sw_forward_y"]], row[self.__slp["sw_forward_z"]] diff --git a/src/wear_mocap_ape/record/watch_phone_uarm_rec.py b/src/wear_mocap_ape/record/watch_phone_uarm_rec.py index 368769d..14ec293 100644 --- a/src/wear_mocap_ape/record/watch_phone_uarm_rec.py +++ b/src/wear_mocap_ape/record/watch_phone_uarm_rec.py @@ -9,11 +9,9 @@ class WatchPhoneUarmRecorder(WatchPhoneUarm): def __init__(self, file: Path, smooth: int = 5, - left_hand_mode=True, tag: str = "REC WATCH PHONE", bonemap: BoneMap = None): super().__init__(smooth=smooth, - left_hand_mode=left_hand_mode, tag=tag, bonemap=bonemap) self.__tag = tag diff --git a/src/wear_mocap_ape/stream/publisher/watch_phone_uarm_ros.py b/src/wear_mocap_ape/stream/publisher/watch_phone_uarm_ros.py index 35a7ea3..0a79e2b 100644 --- a/src/wear_mocap_ape/stream/publisher/watch_phone_uarm_ros.py +++ b/src/wear_mocap_ape/stream/publisher/watch_phone_uarm_ros.py @@ -12,11 +12,9 @@ def __init__(self, ros_node_name="/wear_mocap", ros_rate=20, smooth: int = 5, - left_hand_mode=True, tag: str = "PUB WATCH PHONE", bonemap: BoneMap = None): super().__init__(smooth=smooth, - left_hand_mode=left_hand_mode, tag=tag, bonemap=bonemap)