diff --git a/.gitignore b/.gitignore index dbe9c82..381d783 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vscode/ \ No newline at end of file +.vscode/ +turtle_control/CMakeFiles/* diff --git a/turtle_control/scripts/get_depth.py b/turtle_control/scripts/get_depth.py index 8d0d60c..ea43a35 100755 --- a/turtle_control/scripts/get_depth.py +++ b/turtle_control/scripts/get_depth.py @@ -16,23 +16,26 @@ from geometry_msgs.msg import Twist class get_depth: def __init__(self): + rospy.init_node("turtle_control", anonymous=True) self.bridge = CvBridge() self.depth_img = rospy.Subscriber( "camera/depth/image", Image, self.callback ) - rospy.init_node("turtle_control", anonymous=True) + #We acutally dont want to pulbish anything + self.pub = rospy.Publisher("/cmd_vel_mux/input/navi", Twist, queue_size=1) self.rate = rospy.Rate(10) def callback(self, data): - pass print("TopLeft" + data[0] + ":" + float(data[0]) + "m") - print() + print("callback end") self.rate.sleep() def main(args): gd = get_depth() + try: + ropsy.spin() print("DONE!") cv2.destroyAllWindows()