spoter368 / os3m-software

PC-side software for interpreting and configuring the OS3M mouse
https://hackaday.io/project/187172-os3m-mouse
GNU General Public License v3.0
76 stars 11 forks source link

Integration with Cura #8

Open hotsgit opened 2 months ago

hotsgit commented 2 months ago

The Progress

This isn't the most important integration since you don't need to fly around a slicer much, but it seems simple to me since there's already a 6DoF Cura plugin that supports several devices (and libspnav if you're on Linux).

My progress is here: https://github.com/smartavionics/RawMouse/issues/25

For Future Reference:

Thread about how libspnav support was added for RawMouse in 2020: https://github.com/smartavionics/RawMouse/issues/2

I found an alternate Cura Spacemouse plugin (but at a glance it seems harder to get working): https://github.com/FlyingSamson/SpaceMouseTool

hotsgit commented 2 months ago

It Works!

The OS3M mouse is working in Cura now that SmartAvionics graciously updated the Rawmouse plugin.

Issues:

When I restart the OS3M, a different XYZ axis is drifting in a different direction every time, but then after letting it sit plugged-in for 20+ mins it has low or no drift. Maybe something to do with the OS3M firmware's auto-calibration. In the example below, Z was nearly maxed out when I plugged in the OS3M:

image

But after 20+ mins it's better but still not exactly centered:

image

And then after 60+ mins it's drifting down. This is mostly due to sag (creep) in my PLA+ flexure, but that doesn't explain why it started maxed out, and why the X and Y are sometimes drifting at the start.

image

image

I'll experiment more, design a flexure that's printable with PETG (to avoid creep), and dig into how the firmware calibration works. The Windows Game Controller calibration seems to do nothing.

How to Install Rawmouse in Cura

Follow the readme here: https://github.com/smartavionics/RawMouse

How to Modify the Controls

If the control scheme is unintuitive, first try flipping all axes in Cura by clicking Extensions > Rawmouse > Flip Axes.

These scale/threshold values in the "os3m" profile of the config.json are OK but you can change them to your own preferences...

  "axes" : [
    { "offset": 0.0, "scale": -0.0015, "threshold": 0.080, "target": "movx" },
    { "offset": 0.0, "scale": -1.8, "threshold": 94.0, "target": "zoom" },
    { "offset": 0.0, "scale": 0.0015, "threshold": 0.080, "target": "movy" },
    { "offset": 0.0, "scale": -0.0004 , "threshold": 0.023, "target": "rotpitch" },
    { "offset": 0.0, "scale": -0.0004, "threshold": 0.022, "target": "rotroll" },
    { "offset": 0.0, "scale":  0.0005, "threshold": 0.023, "target": "rotyaw" }
  ]