
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
The python interpreter does get the python code as entered. Including any libraries added to it.
Make sure their library works - or you know how to use it. Because it could have some gotchas. The library could also have dependencies of other libraries etc etc
Interesting... it seems this motor controller uses the same protocol as the Sabertooth if it is in "Standard Serial" mode. Have you considered putting it in that mode and using the sabertooth movement panel?
Problem is with standard serial, Roboclaw only receives data, it does not transmit. To get encoder readings I need two-way serial, which Roboclaw does with the Packet Serial.
Also, I don’t seem to have the Roboclaw Python library installed correctly (which is what you had suggested). I tried to write/run Python code with Roboclaw classes directly (via Windows cmd window instead of ARC) and am having issues.
I think using a robot skill made natively for this controller is the best idea. That way you’re removing extra layers of abstraction. I can check if there’s a c# library because that would be easiest.
what are you wanting from the encoder values? To use the better navigator with nms? Or do you have other plans?
im asking because I’d like to know what features the robot skill needs
BasicMicro does supply a C# library for their motor controllers, and I was thinking about using that. I am a C programmer by profession (30+ years) so it was my first choice. I tried creating a linked in library of functions for doing Alexa voice interface, and ran into troubles getting the C functions I wrote to work in ARC. But that was an early attempt a couple of years ago, and I have yet to re-visit that.
This time around on my attempts to interface with ARC, I decided to look into Python, since both ARC and the Roboclaw motor controller support Python. But of course, linked in C# functions would be much more efficient and execute faster.
So what I am using this for is the waist motor in a full sized Lost in Space Robot (B9). I want to have unlimited rotations in both directions, with speed control, and need to know exactly which way the torso is facing at any given time. I have a slip ring in the center so I don’t have to worry about twisting the wires around.
I’m trying to get my robot to be as fully autonomous as I possibly can, with voice controls. So if I tell the robot to face forward it will know exactly which is the shortest path to do that. And if for some reason it is to act like it confused, it could spin around in circles for 5-10 rotations and still figure out how to get back to facing forward. Maybe even recognize which way a voice is coming from and turn to face that person. The more actuate positioning it has the more thinks I can program it to do.
@Jsale, I'm a Sabertooth/Kangaroo guy and don't know a lot about Roboclaw. I did at one time consider using the roboclaw but thought the ST/Roo was better for my needs in my B9 robot. I am wondering, does the Roboclaw controller (along with the ability to give you direction and speed) have the ability to give you precise position command? I see the Roboclaw does support encoders but I don't see anything about switches. I would think for position control you would need some kind of switch to home to so the controller knows where the motor is.
@Dave Schulpius, Yes it does. You can read the current position, move to a specific position, reset the encoder, set the encoder to a specific value, and much more. And the Roboclaw has settings to allow for range limits (via switches which is what I use in the arms), and homing switch (although I have yet to get that to work; might be switch problem, not sure yet).
And you can even move to a specific position at a current speed with a specified acceleration and deceleration, in just one command.
I was using the Sabertooth/Kangaroo setup like yours, but I had trouble getting it to work consistently. Plus I wanted unlimited number of turns for the waist and radar. So I switched to Roboclaw in the arms and decided to use one in the waist. If I can get this to work, I might swap out the Sabertooth/Kangaroo in the radar as well.
Nice! I'd love to see it all.