Skip to content

Optical flow support#434

Closed
digitalentity wants to merge 2 commits intodevelopmentfrom
opflow-initial-support
Closed

Optical flow support#434
digitalentity wants to merge 2 commits intodevelopmentfrom
opflow-initial-support

Conversation

@digitalentity
Copy link
Copy Markdown
Member

@digitalentity digitalentity commented Aug 8, 2016

This is to discuss and review the code. @martinbudden I'd really apreaciate your comments and suggestions on this one.

Tasks to do:

  • OpFlow detection code in sensor autodetection code
  • OpFlow task to periodically read and collect the data
  • ADNS3080 driver skeleton for SoftSPI
  • ADNS3080 detection code
  • ADNS3080 initialisation code
  • ADNS3080 read code
  • Add OpFlow support to MSP
  • Add OpFlow support to position estimation code and navigation functions

Comment thread src/main/drivers/opflow.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps deltaX and deltaY? Or a union of the two?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A union is good. Will do.

@martinbudden
Copy link
Copy Markdown
Contributor

Well this all looks pretty straightforward so far.

The interesting task is, of course, "Add OpFlow support to position estimation code and navigation functions".

And the soft SPI fixes are a bit hacky, but I guess we can live with that for the moment.

@digitalentity
Copy link
Copy Markdown
Member Author

digitalentity commented Aug 8, 2016

You mean when doing delays? SoftSPI by itself is hacky 😄 Until we have a proper abstraction of Bus layer we'll probably have to live with hacky stuff.

Yes, OpFlow navigation is gonna be a tough one, especially knowing that we need sonar to measure real altitude and calculate correct velocities. Lack of position data from OpFlow is also a problem, so estimated position will probably be locked to (0;0) w/o GPS, but velocity control will allow PosHold and CRUISE mode as well.

Comment thread src/main/drivers/opflow_adns3080.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should get into the habit of forward declarations in header files, eg

struct opflow_s;
bool opflowADNS3080Detect(struct opflow_s *opflow);

@digitalentity digitalentity force-pushed the opflow-initial-support branch from a80bbf5 to f8854f7 Compare August 9, 2016 08:11
@jflyper
Copy link
Copy Markdown
Contributor

jflyper commented Aug 9, 2016

Any good source of ADNS3080?

@digitalentity
Copy link
Copy Markdown
Member Author

@jflyper
Copy link
Copy Markdown
Contributor

jflyper commented Aug 9, 2016

Cool. Thanks!

@digitalentity digitalentity changed the base branch from master to development September 7, 2016 12:49
@martinbudden
Copy link
Copy Markdown
Contributor

@digitalentity , can you rebase this?

@digitalentity
Copy link
Copy Markdown
Member Author

Sure.
At the moment I don't have much time to spend on this but the project is not abandoned 😄

@digitalentity digitalentity force-pushed the opflow-initial-support branch from f8854f7 to daa932c Compare October 4, 2016 09:05
@digitalentity
Copy link
Copy Markdown
Member Author

@martinbudden rebased. I would appreciate if you would look at initialisation part of drivers\opflow_adns3080.c - this is the most hacky part of code at the moment.

@digitalentity digitalentity modified the milestones: 2.0, 1.3 Oct 4, 2016
@johnsilvester
Copy link
Copy Markdown

Hi guys! Is this still in progress?

@digitalentity
Copy link
Copy Markdown
Member Author

This is a very slo-mo task, sorry. Eventually we'll see opflow support, but probably not very soon.

@johnsilvester
Copy link
Copy Markdown

Wish I could help. I'll try to do a little research and maybe speed up the progress

@martinbudden
Copy link
Copy Markdown
Contributor

@digitalentity , can you rebase this. I know it's on hold at the moment, but I think it's a good idea to rebase it now otherwise rebasing will get increasingly difficult.

@digitalentity digitalentity force-pushed the opflow-initial-support branch from 42cd5ab to b2b7955 Compare January 2, 2017 15:06
@digitalentity digitalentity force-pushed the opflow-initial-support branch 3 times, most recently from 41b10dc to 83f4a4a Compare January 2, 2017 15:33
@digitalentity digitalentity force-pushed the opflow-initial-support branch from 83f4a4a to a063c05 Compare January 2, 2017 15:34
@johnsilvester
Copy link
Copy Markdown

Could someone explain to me how far into the development we are? I see the check marks but I'm a little confused as to what needs to be done. Thanks!

Comment thread src/main/fc/config.c Outdated
#ifdef OPTICAL_FLOW
config->opflowConfig.opflow_hardware = OPTICAL_FLOW_AUTODETECT;
#else
config->opflowConfig.opflow_hardware = PITOT_NONE;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo, presumably this should not be PITOT_NONE.

@digitalentity
Copy link
Copy Markdown
Member Author

OMG, after PGs are done this will be one hell of a rebase.

@digitalentity
Copy link
Copy Markdown
Member Author

@johnsilvester I've barely scratched the surface here. The hardware was detected and read properly (at least several rebases ago), but no actual sensor fusion is performed.

@johnsilvester
Copy link
Copy Markdown

@digitalentity Cool! Thanks for all of the progress so far!

@MengHaoyu
Copy link
Copy Markdown

does this patch work?I want to use it

@digitalentity
Copy link
Copy Markdown
Member Author

@MengHaoyu no, it doesn't. I have this on low priority.

@MengHaoyu
Copy link
Copy Markdown

ok,thanks,i bought an a3080 sensor, i thought i could use it 😬

@digitalentity
Copy link
Copy Markdown
Member Author

Will be replace with new PR

@digitalentity digitalentity deleted the opflow-initial-support branch September 8, 2017 12:52
@digitalentity digitalentity removed this from the 2.0 milestone Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants