Intel® Aero Platform For UAVs
Peer-to-peer support only
Announcements
This is a peer-to-peer only forum. This forum is not monitored by Intel.
771 Discussions

Publishing images from bottom camera to ROS topics

trix
New Contributor I
3,422 Views

Hi,

Like the title says, I'm trying to publish images from the bottom camera of the RTF drone using ROS. Initially, I modified the existing http://wiki.ros.org/usb_cam usb_cam ROS package and this allowed me to communicate with the camera, but I've been struggling with trying to then calibrate my camera since the video stream that I get seems to just be a noisy image (I attached an image of it). To clarify, I'm still able to get some kind of stream but it seems to splice together 5 of the same streams into one, which can be seen with the 5 different columns.

I've considered that the problem is simply a matter of decoding the yuv420 pixel format of the bottom camera into RGB, but I am still fairly new to C++ so I have been struggling with this problem. Am I going about this in the right direction or is something else causing this noisy stream?

Any help would be appreciated.

1 Solution
trix
New Contributor I
1,476 Views

Actually, nevermind. My problem wasn't about the pixel format but when I was initializing the device.

View solution in original post

27 Replies
BSzeb
Novice
137 Views

Hi daniele.marchetti,

Yes I have the same issue on the edges. In addition I have vertical stripes which can be seen on a plain white image.

DMarc8
Beginner
137 Views

Hi Chillax,

thank you for your response. My camera doesn't show vertical stripes, the issue is only for the edges.

Is this issue caused by the hardware or software and is there any way to solve it?

Can I apply the optical flow algorithm correctly although I have the issue on the edges?

Thank you,

Daniele

idata
Community Manager
137 Views

To solve the borders, I just cropped them to have a 630x470 image instead.

https://github.com/AlexisTM/aero-optical-flow-ros

This node is also computing the optical flow and send it to the PX4.

DMarc8
Beginner
137 Views

Hi AlexisTM,

Your ROS application is very interesting. I run it and by QGroundControl station I checked that the optical flow algorithm works properly (and the quality is above 100) but Local_position_x and y stay to 0 all the time.

I set

EKF2_AID_MASK = 2

EKF2_HGT_MODE = Range sensor

SENS_EN_LEDDAR1 = enabled

In addition I can set the parameter SENS_FLOW_ROT. I tried using different values but I'm not able to get correct value from local_position_x and y yet.

Could you suggest me a solution?

Thank you,

Daniele

idata
Community Manager
137 Views

Hi daniele.marchetti

I could not use it yet because I only have Teraranger Ones and the driver seems not to be working.

Without the ranging device; I cannot get a local position.

Therefore I connected a PX4Flow on it and use the bottom camera for tag recognition only (VIO disabled).

DMarc8
Beginner
137 Views

Thank you for your response. I thought the same thing: install a PX4FLOW to implement the optical flow and use the bottom camera for marker recognition and vision pose estimation. Have you installed PX4FLOW using the instruction on https://www.instructables.com/id/Intel-Aero-Drone-Altitude-and-Position-Hold-Using-/ Intel Aero Drone - Altitude and Position Hold Using PX4Flow: 11 Steps (with Pictures) (PX4flow camera with sonar included) ?

Thank you,

Daniele.

idata
Community Manager
137 Views

I did not follow that; I added the PX4Flow driver and started it automatically in the PX4 Firmware; See the two commits at my local branch (from 1.8.0): https://github.com/umdlife/Firmware/tree/intel GitHub - umdlife/Firmware at intel

To make and upload the Firmware:

make aerofc-v1_default upload

https://docs.px4.io/en/flight_controller/intel_aero.html https://docs.px4.io/en/flight_controller/intel_aero.html

Reply