Access AR.Drone camera with OpenCV while connected to ROS
Hi,
I am having an issue where by I am unable to connect to the AR Drone camera when the drone is connected through ROS using the ardrone_autonomy ardrone.launch.
I think the issue is due to the fact that I am trying to access the drone camera through the ip address with OpenCV and Python while connected through ardrone_autonomy. Below is a code snippet of how I am accomplishing this.
{ video_capture = cv2.VideoCapture() video_capture.open('tcp://192.168.1.1:5555') vidWidth = video_capture.get(cv2.CAP_PROP_FRAME_WIDTH) vidHeight = video_capture.get(cv2.CAP_PROP_FRAME_HEIGHT) }
As you can see that I am using the IP address for the camera. This works perfectly when the drone is not connected through ros which is essentially like a webcam. My end goal is for tracking and navigation through the use of images received from the camera using OpenCV which means I will have to issue movement commands(cmd_vel) which requires a connection through ardrone_autonomy based on the images received and processed by OpenCV.
Is there anyway I can accomplish this by using the IP camera from the drone while connected to ROS?
Thanks for any help!