From 9566763ae8278215d12903dddf5205e3d3152d6c Mon Sep 17 00:00:00 2001 From: yy389 Date: Tue, 10 Oct 2023 22:22:49 -0400 Subject: [PATCH] clean if-else Co-authored-by: Janna Lin --- hello_helpers/src/hello_helpers/hello_misc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hello_helpers/src/hello_helpers/hello_misc.py b/hello_helpers/src/hello_helpers/hello_misc.py index b3fb0dd..eec3603 100644 --- a/hello_helpers/src/hello_helpers/hello_misc.py +++ b/hello_helpers/src/hello_helpers/hello_misc.py @@ -243,6 +243,7 @@ class HelloNode: self.tf2_buffer = tf2_ros.Buffer() self.tf2_listener = tf2_ros.TransformListener(self.tf2_buffer) + if self.robot_name == None: self._joint_states_subscriber = rospy.Subscriber('/stretch/joint_states', JointState, self._joint_states_callback) self._tool_subscriber = rospy.Subscriber('/tool', String, self._tool_callback)