px4flow velocity calcuation
Hi,
I have a px4flow smart camera sensor, and use the px4flow_node to read the sensor output.
The topic /px4flow/optflow has a message type:
Header header
float32 ground_distance # distance to ground in meters
int16 flow_x # x-component of optical flow in pixels
int16 flow_y # y-component of optical flow in pixels
float32 velocity_x # x-component of scaled optical flow in m/s
float32 velocity_y # y-component of scaled optical flow in m/s
uint8 quality # quality of optical flow estimate
But when I see the output I only have values for flow_x and flow_y. I am only using it for a 2D robot so assuming I always know the ground distance, can someone please tell me how to calculate the x and y velocities using the flow_x and flow_y values?