-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gz] optical flow support #23456
[gz] optical flow support #23456
Conversation
329c427
to
baa7ec3
Compare
There is pretty much no drift on the textured world, but even on the lawn world it does drift a bit: |
I didn't realize gazebo sitl already had flow so I am going to update this to use the OpticalFlow repo |
@Jaeyoung-Lim I added the PX4/OpticalFlow in my latest commit. The performance is much worse, it just toilet bowls and wanders. Any ideas? FYI for testing ensure EKF2_OF_CTRL is enabled and SIM_GPS_USED is set to 0 to ensure only flow is used for position hold. |
@dakejahl I would check the camera orientation if it toilet bowls |
@Jaeyoung-Lim The orientation looks correct. I think the issue is the noise, I was seeing this in my original implementation when poor quality keypoints are used in the flow average. |
The issue was |
It's working. I think there was an issue with the libOpticalFlow in the cmakelist, it was working after I placed it further down in the camera folder's cmakelist, after add_library |
I'm not sure why but sometimes when sim is launched PX4 reports
And it never recovers |
int quality = _optical_flow->calcFlow(gray_image.data, sim_time, integration_time, flow_x, flow_y); | ||
|
||
return quality; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a sensor plugin for an optical flow sensor, not calculate optical flow inside the gzbridge. Then it is not a bridge anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yeah I was thinking about that. I need to figure out how to create a gz plugin that is launched with sim since it doesn't exist yet for gz
f920d27
to
656ed73
Compare
656ed73
to
5e77e99
Compare
Opening this draft PR for review and testing
gz models branch
https://github.com/dakejahl/PX4-gazebo-models/tree/pr-rangefinder