PRO
jsale
USA
Asked
Has anyone written a skill or script that will support the RoboClaw Packet Serial Mode communications? Specificly, a skill/script that can set the motor speed, direction, and read the encoder using the CRC16 check defined by Motion Control for use with their RoboClaw Solo 30A motor controller?
Related Hardware EZ-B IoTiny

Ah, apologies for dropping the ball on this one. I overcommitted and won't be able to complete this until most likely after the new ARC24 ARC/2 ARC.2 is released. Geez, we have to agree on a name soon! No one knows what to call it. But the new ARC will make implementing things like this much more manageable. The time frame for the new ARC is sometime in the new year. Albeit, porting the 700+ robot skills over will take a bit of time as well
I have a template project that I started on a while ago. I'll attach it here once I get in front of that laptop. I'm on a different PC right now.
@DJSures, Your last comment (Dec) mentioned that you were going to attach a template project file to the comment, but I don't see the attachment. Also, any update to when the Roboclaw port will be available?
Ah, crazy, I had the temp skill I was working on on my desktop in the fall - it looks like I deleted it at some point. If I come across it and I didn't delete it, I'll post it. But in the meantime, I'm swamped with ARCx development and don't have time for volunteer development. Your best bet is to tackle a robot skill. I'll try to answer questions, but I don't have much free time.
Oh, or you can reach out to the manufacturer of that product and ask them to contribute a robot skill - that's how they usually get created.
Looking at it real quick again to refresh my memory. I came across this 9-year-old driver that someone was working on for Python. It seems like the cleanest version of any examples I've seen using that product. I don't know why they made it so complicated and the driver so hard to use. I guess that's why it's such a rare device.
Here's the link: github.com/sonyccd/roboclaw_ros/blob/master/roboclaw_node/src/roboclaw_driver/roboclaw_driver.py
I asked gpt4 to convert that python and got this bit to test with...
And a few more tips - this will be super helpful. The template for the Sabertooth Kangaroo Movement Panel will provide a skeleton to drop in the commands from the robot claw.
Using that above conversion as a library to stub into the sabertooth serial class should provide movement quickly.
Here's the sabertooth mvoement panel source: Sabertooth Kangaroo Movement Panel.zip
Okay, I just spent the last hour after dinner staring at that Python script, and I take it back. It's probably the worst code I've ever seen in my life. There are 10-20 duplicate functions for every function. For some reason, the author copied functions repeatedly and gave them new names with the same code inside.
Everything about the roboclaw is poorly supported. I don't know what to tell you, but we understand why no one uses it. If you want to help that company by cleaning their code and making something work, my above example should do that. But it's going to be a HUGE job for you.
Here this should work as it's mostly complete...