Skip to content
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

Finding home fails #1364

Open
amerkay opened this issue Aug 9, 2019 · 7 comments
Open

Finding home fails #1364

amerkay opened this issue Aug 9, 2019 · 7 comments

Comments

@amerkay
Copy link

amerkay commented Aug 9, 2019

Expected Behavior

Using v7.0.1, "find home" should go back to 0,0,0 and error correct minor slips during operation.

Actual Behavior

1 out of 10 times, it fails. It just sets x-axis at home when it's actually at x=1000 (!=0). Now it's doing everything at an offset, and not doing what it should.

Steps to Reproduce

Maybe it's my woodwork with the garden bed. Just regular run time, 1/10 times.

Results of git log -1

NA

Am i missing something in the configs (Imgur)? If not, let's add a retry feature to homing if successful in regular operation (not manual calls) - if the homing is way off (>5%) like homing at x=1000 and succeeding incorrectly.

@AscendFB
Copy link
Contributor

AscendFB commented Aug 11, 2019

Maybe it's my woodwork with the garden bed. Just regular run time, 1/10 times.

Your X-axis stalls which causes the encoder to assume that the end is reached. Check your mechanics and moving behavior at those positions where the issue occurs.

If not, let's add a retry feature to homing if successful in regular operation (not manual calls) - if the homing is way off (>5%) like homing at x=1000 and succeeding incorrectly.

How is the bot supposed to know if the homing was truly successful? It just can't detect if it is really at the end. So I don't see a possible software fix.
-> The only way to check that properly is by adding a position switch at each home position. But fixing your mechanics should already be enough to find home properly (in case nothing blocks the tracks).

@amerkay
Copy link
Author

amerkay commented Aug 11, 2019

Thanks for the reply.

The way I see it is, if I stop using the "Find Home" in my sequences, I have no problem, as the regular retry mechanism fixes a failed move by retrying (I have it at 7 for z-axis, but 3 default works fine too, just need to grease my z-axis screw with something other than olive oil).

How is the bot supposed to know if the homing was truly successful?

That's why I suggested only enabling this check if we are in a sequence (not manual, calibrating device mode from the "Controls" tab). If it succeeds at what's supposed to be x=1000, we don't trust this result and retry "Find Home". We can add say, if 3 retries fail, just believe x=1000 is now 0.

Thoughts?

@amerkay
Copy link
Author

amerkay commented Aug 11, 2019

I put together this sequence. It should accomplish the same result. Be at 0,0,0 before trying to home, during normal usage within a sequence. I'll try it over the next few days.

Imgur

@AscendFB
Copy link
Contributor

Be at 0,0,0 before trying to home, during normal usage within a sequence. I'll try it over the next few days.

I've been using this for many months now and its working great so far.

If it succeeds at what's supposed to be x=1000, we don't trust this result and retry "Find Home". We can add say, if 3 retries fail, just believe x=1000 is now 0.

Now I got it. But having simple retries would probably not be enough. I'd rather like the bot to move to a preposition right before home just as you did in your sequence. If the motor stalls on the way to that position we will get an error message (maybe after a few retries).

@amerkay
Copy link
Author

amerkay commented Aug 12, 2019

This leads us to, how to we get to this? I did some inspect html cutting and pasting to visualize.

Do you know where to find the code for the "Find home" sequence block?

@RickCarlino
Copy link
Contributor

@amerkay It's in FarmBot OS here. Like most programming environments, the way that FarmBot OS converts CeleryScript nodes to executable code is somewhat complex. We might have time to do a write up if you are curious.

@amerkay
Copy link
Author

amerkay commented Aug 12, 2019

Thanks @RickCarlino! Maybe when we try figuring out the wifi RTL8188 drivers, we can add some beta code to the branch.

For now, the sequence seems to have done the trick. But it seems like a bug during normal operation, that's why I reported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants