Ugh, is there no simple servo reverse function? But thanks anyway, I try as best as I can and if everything fails…
R_ALF
Ugh, is there no simple servo reverse function? But thanks anyway, I try as best as I can and if everything fails…
R_ALF
You could try using the expression “(3000 - position)” no quotes, to reverse a position.
Alan KM6VV
Yep if you were doing output to SSC-32 or the like. However this is doing HSERVO. So to reverse simply take the expression and negate it…
Kurt
You MUST have a defective servo. Replace it. There’s no way I would ever hack the code to fix a hardware fault. >.<
Hm, I don’t know, the problem is, if I move the left analog stick on my controller up, my hexapod moves back, and if I switch between the walking modes, the feet are going in any direction
I think, its rear right leg isn’t ITS rear right leg, it’s its rear left leg, looking on the front of the pod and not onto it.
I hope you got it
R_ALF
P.S. replacing a servo was my first thought, too. But I replaced it (connecting a external servo to the same pin) and it does absolutely the same thing.
Then you simply have the servos plugged into the wrong channels.
I hope so, this I definitely have to check, but I just don’t know why just one servo turns in the wrong direction and not a whole side.
Well I know what I have to do today, I hope that works.
P.S. I plugged the servos in after the “phoenix assembly guide” and after this, you have to look onto it, and not from the front.
R_ALF
UPDATE
So I mirrored all feet, so its rear right leg is now its left rear leg, and so on for all the other feet. It is still walking backward, but that’s ok, I know now how to solve THIS problem
I tested it out, all feet work fine except the rear right leg. Not just one, all three servos work reversed, I looked very, very closely.
My next step is now trying to get it walking in the right direction.
P.S. if everything fails, where do I have to put the expression “(3000 - position)”
R_ALF
The code was written for hitec servos which rotate clockwise for larger pulses. The servos you are using are probably futaba copies and will rotate counter clockwise for larger pulses. So even if you trick it by swapping the vertical servos from left to right the robot will walk backwards. In fact you really want to reverse all of the servos.
There is no sound reason for the one leg to act differently. Are all of the legs built exactly the same?
Yes, all of the feet are the same. It walks, just backwards and just with 5 feet. If I do a spacer under the sixth and disconnect it, it walks fine. And I tried different pins and different servos.
R_ALF
If this is really happening, then it’s a first. I have no idea what could be causing it.
So, I tried everything I know… used different servos, used different pins, mirrored the right and left side and turn front to back.
And as Robot Dude wrote, it might be in relation to futaba copies this doesn’t matter because I ordered 3 different packages from different dealers to get all 18. And of these servos, there are 5 feet working well…
So at least, I wanna try to reverse all 3 servos. And as KM6VV wrote to try the “(3000 - position)”, I just wanna know now, where I have to put this in the code?
I just wanna see it walk. No balancing, no special walking gaits for now, just simple walking
R_ALF
P.S. the hexapod is mechanically done. Now,I just have to program it…
Kurt answered this a ways back. You can’t use the (3000 - position) because that is used for when the Basic Atom Pro or ARC-32 is sending data to the SSC-32. Using the SSC-32 is a much better approach in my not so humble opinion. It’s simply more stable sending data to the dedicated servo controller rather than shove it all onto one processor.
The last time we had a very well established piece of code no longer work was for PS2 control of an arm. Lots of people trying to fix it with no good results, then finally it was determined that a bug was introduced into the BM Studio editor. There is just no way to know if this is a similar situation, but we all agree it used to work flawlessly.
So hservo uses a signed variable +12,000 to -12,000 where 0 is centered. So to quote Kurt, “So to reverse simply take the expression and negate it…”
Something just isn’t adding up here…