rirze / mirobot-py

A Python interface library for WLkata's Mirobot
https://rirze.github.io/mirobot-py/
MIT License
24 stars 9 forks source link

Move function go_to_axis ignores speed parameter #21

Open johnnyfox87 opened 2 years ago

johnnyfox87 commented 2 years ago

I use these to functions to rotate the first axis:

api.go_to_axis(x=90, y=0, z=0, a=0, b=0, c=0, d=0, speed=800)
api.go_to_axis(x=0, y=0, z=0, a=0, b=0, c=0, d=0, speed=1800)

But the speed of both movements stays the same. It is about 1800°/min in both cases.

When I use WLKATA studio (V1.018) it works correctly. Also the G-code is the same. Firmware version of robot arm: 1.0

Has anyone the same issue?

rirze commented 2 years ago

Can you try the latest version:

pip install mirobot-py==2.0.0b0
johnnyfox87 commented 2 years ago

Today I had a chance to try it with the new version, but there is no change. The arm moves still with the same speed.

rirze commented 2 years ago

Is the G-code exactly the same? Including spaces and capitalization?

johnnyfox87 commented 2 years ago

Yes it is. When I copy the G-code from the debug output and paste it in WLKATA studio, it works correctly.

rirze commented 2 years ago

Then I am really at a loss. Based on what you've told me, this sounds like a parsing issue with the Mirobot's firmware itself. Perhaps they introduced a bug between their version upgrades.

Unfortunately, I fundamentally refuse to work with WLKata's newer firmware versions ever since they made it closed-source and thereby reneging on their Kickstarter promises.

If you have the patience, I'd recommend testing the same code with and with out the wait=True parameter. This enables the class to try and poll when the Mirobot is available for the next action, and is pretty convoluted. When you use wait=False, make sure to inject time.sleep(...#secs) statements between Mirobot movements to give it enough time.

pglombardo commented 1 year ago

Unfortunately, I fundamentally refuse to work with WLKata's newer firmware versions ever since they made it closed-source and thereby reneging on their Kickstarter promises.

I did not know this - you've saved me from buying a second one. Has anyone opened up the Mirobot and thought about adding custom firmware or replacing the logic board entirely?

rirze commented 1 year ago

I did not know this - you've saved me from buying a second one. Has anyone opened up the Mirobot and thought about adding custom firmware or replacing the logic board entirely?

I've thought and tried it twice-- I luckily had the last source checkout of the Mirobot's firmware before it went closed source. By the time I went to flash and test my modified version, my board crapped out and wouldn't work anymore. I took it as a sign to just give up this endeavor.

pglombardo commented 1 year ago

If I ever rage quit this project I'll gift you mine :-)

There is no reason why these servos shouldn't work with a plain Arduino or Raspberry Pi. Do you know anything about the specs of the servos? I'm tempted for this to be my next project.

Any info or resources would help.

The more I dig, the more I find. It's just time consuming to search to the ends of the internet.

rirze commented 1 year ago

The more I dig, the more I find. It's just time consuming to search to the ends of the internet.

My god, you found someone who was willing to upload the firmware. Nice find. I remember finding the author of that repository creating a really handy app that could control the mirobot from your iPhone. I suspect he must've faced the annoying gcode parsing issues that plagued this project too.