diff --git a/ros/kxr_models/node_scripts/urdf_model_server.py b/ros/kxr_models/node_scripts/urdf_model_server.py index d8c49539..af962195 100755 --- a/ros/kxr_models/node_scripts/urdf_model_server.py +++ b/ros/kxr_models/node_scripts/urdf_model_server.py @@ -43,12 +43,13 @@ def run(self): temp_file.write(urdf) urdf_path = temp_file.name - md5sum = checksum_md5(urdf_path) + urdf_md5sum = checksum_md5(urdf_path) compressed_urdf_path = os.path.join( - kxr_models_path, "models", "urdf", f"{md5sum}.tar.gz" + kxr_models_path, "models", "urdf", f"{urdf_md5sum}.tar.gz" ) if os.path.exists(compressed_urdf_path): + md5sum = checksum_md5(compressed_urdf_path) self._update_robot_description(urdf_path, md5sum, kxr_models_path) continue @@ -60,6 +61,7 @@ def run(self): compress=True, ) rospy.loginfo(f"Compressed URDF model saved to {compressed_urdf_path}") + md5sum = checksum_md5(compressed_urdf_path) self._update_robot_description(urdf_path, md5sum, kxr_models_path) os.remove(urdf_path)