-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support for brushless hardware #94
Conversation
Plan tests fail, gonna have to take another look at it tomorrow unless you have a chance to look at it. |
It runs pretty well on a RPi 4! We did notice that the default settings for brushless are pretty slow. It looks like you used the defaults from Got an OOM error that I haven't seen before. No idea if this is new or was triggered by a longer/slower plot (#101).
Did not try the UI brushless checkbox; does it work for you? |
It works! |
I'll update the speed values and look at the OOM. |
Its not obvious to me what parameters need to be updated to speed up the motor - all the past brushless diffs use the same settings. Mind proposing what changes to fix things? (I assume its accel and maxVeloctiy). I started looking at https://github.com/evil-mad/axidraw/blob/master/inkscape%20driver/axidraw_conf.py and I think it'll take some time to document what params are in what units, and how they map to each other. Theres also a little confusion of PlanOptions vs Device vs ToolingProfile. Might be reading the wrong fields in some of the code. |
Some notes regarding the planning test - this is stream of consciousness. What motions do we expect for a single point at 10, 10? Logically I would expect: up = profile.penUpPos, down = profile.penDownPos
PenMotion(???unknownStartingPosition???, up)
XYMotion([0,0], [10,10])
PenMotion(up -> down)
PenMotion(down -> up)
XYMotion([10,10], [0, 0]) What do we get if we print the plan? [
{ xy: [ { x: 0, y: 0 }, { x: 10, y: 10 } ] }, // move from origin to point
{ z: [ 17750, 15700 ] }, // drop the pen
{ xy: [ { x: 10, y: 10 }, { x: 10, y: 10 } ] }, // **move from point to point** <-- wat
{ z: [ 15700, 17750 ] }, // lift the pen
{ xy: [ { x: 10, y: 10 }, { x: 0, y: 0 } ] } // move from point to origin
] Can we query the initial position? Should be able to. Might be a TODO in the Should we always start with a PenMotion to up? Why do we have an XYMotion with start === end? |
I can't figure it out either. My initial guess of Perhaps |
src/planning.ts
Outdated
@@ -336,7 +336,7 @@ export class Plan { | |||
// TODO: Remove this hack by storing the pen-up/pen-down heights | |||
// in a single place, and reference them from the PenMotions. | |||
if (j === this.motions.length - 1) { | |||
return new PenMotion(this.minPenPosition, penUpHeight, motion.duration()) | |||
return new PenMotion(Axidraw.penPctToPos(0), penUpHeight, motion.duration()) |
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.
We don't want to hard-code this, but I wanted to make it explicit where the logic change had occurred.
Seems relevant: nornagon@6ed9d5d
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.
oh! good catch, yeah this should be fixed. Honestly I have not looked into why PenMotions need a starting position in their motion definition - we should be able to know what the current position is since we only ever configure 2 pen positions - up and down - and use that to calculate the target duration delay.
Updated the main comment to include checking that real world dimensions are correct. |
Probably relevant: nornagon#120 |
Made some special rectangles, all came out exactly to the |
Congrats and thank you, that's great news! |
So I tried a more complex svg, and now the stuttering issues are back. also cancel is unresponsive. had to kill the process. Cannot check if this is a problem upstream or with this patchset since I only have one axidraw. So we might need to remove the webserial support after all for it to work. |
Pretty sure it's upstream. And intermittent. :S You can usually see in the console there are lots of connects/disconnects. |
Did a little digging by printing out the number of clients when connecting on the server, and a single tab was showing 10 connections. Seems an issue. |
Should be ready to merge
check real world dimensions are correctfix final pen position after a cancelget the tests to pass