Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ar drone - camera transparent images

Hello,

I am using a python script to control the tum ar drone. I have prepared an environment in gazebo, in which the drone flies and captures the image. However, in the image my camera captures, the chairs and other objects are transparent. I have included the images from the camera below: 1- during the experiment, 2 - saved to .png using below callback

def front_image_callback(self, msg):
    try:
        # Convert your ROS Image message to OpenCV2
        cv2_img = CvBridge().imgmsg_to_cv2(msg, "bgr8")
    except CvBridgeError, e:
        print(e)
    else:
        # Save OpenCV2 image as a jpeg
        cv2.imwrite('front_camera/image_{}.jpeg'.format(self.k), cv2_img)
        self.k += 1

C:\fakepath\camera2.png
C:\fakepath\camera.png

Does anybody have an idea how can I update the camera not to be transparent? In my gazebo world, everything is normal, as shown in this image:

C:\fakepath\gazebo.png

Ar drone - camera transparent images

Hello,

I am using a python script to control the tum ar drone. I have prepared an environment in gazebo, in which the drone flies and captures the image. However, in the image my camera captures, the chairs and other objects are transparent. I have included the images from the camera below: 1- during the experiment, 2 - saved to .png using below callback

def front_image_callback(self, msg):
    try:
        # Convert your ROS Image message to OpenCV2
        cv2_img = CvBridge().imgmsg_to_cv2(msg, "bgr8")
    except CvBridgeError, e:
        print(e)
    else:
        # Save OpenCV2 image as a jpeg
        cv2.imwrite('front_camera/image_{}.jpeg'.format(self.k), cv2_img)
        self.k += 1

C:\fakepath\camera2.pngC:\fakepath\camera2.png
C:\fakepath\camera.pngC:\fakepath\camera.png

Does anybody have an idea how can I update the camera not to be transparent? In my gazebo world, everything is normal, as shown in this image:

C:\fakepath\gazebo.pngC:\fakepath\gazebo.png