From 4de278047379bee97f91d1fe67f9321a867e344d Mon Sep 17 00:00:00 2001 From: Charlie Kemp Date: Thu, 7 Oct 2021 17:08:45 -0400 Subject: [PATCH] sleep before trying to configure the D435i This appears to fix an issue where the D435i's mode was not being successfully changed on launch. The code now sleeps for 3 seconds before trying to configure the D435i, which appears to fix the problem for the typical launch files in stretch_ros. This also appears to resolve an issue that resulted in warnings from the ArUco marker detection node and calibration issues. Without a successful mode change, depth images from the D435i often failed to provide depth values for the pixels corresponding with the ArUco markers on Stretch's body. Addressing this issue will likely obviate the need for Hello Robot's D435i patch that pins earlier versions of the D435i software. --- stretch_core/nodes/d435i_configure | 1 + 1 file changed, 1 insertion(+) diff --git a/stretch_core/nodes/d435i_configure b/stretch_core/nodes/d435i_configure index f980344..ce1399f 100755 --- a/stretch_core/nodes/d435i_configure +++ b/stretch_core/nodes/d435i_configure @@ -40,6 +40,7 @@ class D435iConfigureNode: ) def main(self): + rospy.sleep(3) # sleep for 3 seconds to wait for D435i to be ready rospy.init_node('configure_d435i') self.node_name = rospy.get_name() rospy.loginfo("{0} started".format(self.node_name))