Test depth
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
||||
.vscode/
|
||||
.vscode/
|
||||
turtle_control/CMakeFiles/*
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user