Test depth

This commit is contained in:
2023-12-17 21:01:00 +01:00
parent c6d98a1922
commit bf41b75f6e
2 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -1 +1,2 @@
.vscode/
.vscode/
turtle_control/CMakeFiles/*
+6 -3
View File
@@ -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()