Expected Behavior for Exercise 2.2

According to the text, “you will see two important things. The first is a spectacular open-source pictura from NASA in the graphical tools, and the second is that in the direction you launch this file, you will have a new image. Yes, you’re right, it is a picture taken from your drone.”

I don’t have a problem with the first part but with the second expected behavior. What should I find exactly? Thanks in advance!

Hello @sara.aldhaheri ,

You should find an image in the path where you executed your program. It’ll be omething similar to this (depend on the position/orientation of the drone at the moment of taking the picture):

drone_image (1)

If you don’t find the image, look for it in the path /home/user/.ros since it might be there.

Best,

My issue was that I used:

roslaunch unit2 <mylaunchfile.launch> instead of rosrun load_image.py

rosrun creates the drone_image.jpg file but roslaunch does not.

The real time view was also only available after completing exercise 2.3 not at the end of exercise 2.2

Thank you @albertoezquerro


While launching the file I am getting this error, My code is the same one from the solution. Please help me out here

Hi @Rugved_Palodkar ,

Welcome to this Community!

A quick assessment of your problem would be that you did not receive an image for imshow show function.

When OpenCV reports an error that says size.width>0 && size.height>0, it means that it received an image data whose width and height were zeros, basically stating that no image data was received, probably the image data used in imshow function holds a None type.

Check your image stream or your image input source. Verify if you are getting camera feed in your program. If you are getting camera feed from subscriber, make sure you are using the right topic to access the image data.

Regards,
Girish

Thanks a lot @girishkumar.kannan
I rechecked the path and found it to be correct. It seems that cv2 is not getting imported.
image

I checked in the terminal if cv2 was installed or not and found that it is indeed installed.


I am getting the same issue with numpy.
Can you please help me out here. Thank you

Hi @Rugved_Palodkar ,

Can you please post your error output?

If you say that you have “an error with numpy” I will have no clue what to fix! I need some context.

Regards,
Girish

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.