Joint directions reversed with robot arm

More
05 Aug 2018 18:35 #115643 by Wireline
Hello

On each of the joints of my arm, its positive direction of rotation is indicated. For joints 0, 1 and 3 the rotations match i.e. they go in the direction of the arrow when I click the '+' jog button in AXIS. However when I click the '+' button for joints 2, 4 and 5, they go in the opposite direction to the arrow, and also opposite to the simulator version of the arm that I built with the same parameters.

The wiring in the joints is UVW with resolver feedback, and wiring anything back to front or wrongly just makes the STMBL drive switch to idle, so I do not believe it has anything to do with wiring.

Is there a way to reverse a joint direction?

Cheers
More
05 Aug 2018 18:57 #115644 by tommylight
Yes, open the calibration menu in linuxcnc, there choose the joint you want to change settings, change the scaling and output scale to negative values. Just add a "-" in front of them, press test and check if it works as it should.
More
05 Aug 2018 19:48 #115645 by Wireline
Hi Tommy

Do you know if that works for pure joints or is it meant for things like mill axes? My ini didn't have the OUTPUT_SCALE or OFFSET_SCALE parameter for any of the joints (its homebrewed due to being a robot arm) so I manually added it under the

[JOINT_2]
TYPE = ANGULAR

Section. I set Output scale to -1.00 and output offset to 0.00. However the motor still goes in the wrong direction.

If I hit calibration in axis, I get a message saying there are no tunable parameters, I guess because again its a homebrew. Do I need to add the tuneable parameters to the halfile as it suggests, and if so is there a guide to doing this? I am feeling a touch lost!
More
05 Aug 2018 20:29 #115647 by rodw
Try making STEP_SCALE negative
More
05 Aug 2018 20:40 #115648 by Wireline
Hi rodw,

Cheers for the suggestion. I added

STEP_SCALE = -1.0

to the relevant axis and sadly no dice. Are there any other parameters it may rely on? I have a hand-written ini file as opposed to one created by step conf, so I may have some enabling parameters missing.
More
05 Aug 2018 20:47 #115649 by rodw
I think what Tommy and I have suggested is based on joints used in trivial kinematics (eg. XYZ). STEP_SCALE is the number of steps used per device unit or per degree.

I think you need to look at your custom kinematics module for the robot arm. Maybe you can invert some inputs. I've got no experience with robot arms.
The following user(s) said Thank You: Wireline
More
05 Aug 2018 20:55 #115651 by Wireline
Ah right that makes sense, I am using genserkins! Whats odd is I had the exact same setup running with a vismach simulation and all the joints go the right way. I guess I can't rule out a hardware issue, but I've even tried rearranging the UVW wiring in multiple ways, and the STMBL drives just lock up.

I wonder if its possible to communicate with the guy who wrote genserkins?
More
05 Aug 2018 23:13 #115652 by rodw
I don't understand the pin names for genserkins but I am guessing you could use the invert component in front of the input pins to achieve the correct direction of rotation. linuxcnc.org/docs/devel/html/man/man9/invert.9.html
The following user(s) said Thank You: Wireline
More
05 Aug 2018 23:17 #115653 by Wireline
Hello! Thought it would be only polite to let you know the solution :) I spoke with rene who made the STMBL drives, and the way to reverse the motors is to use the STMBL's scale command and add the minus there. Its uploaded to the profile on the STMBL EEPROM.

All my motors now go the right way, and I am happy. Well I was happy, for 5 minutes until the next thing to solve came along, but hey that's building stuff :)
The following user(s) said Thank You: rodw
Time to create page: 0.083 seconds
Powered by Kunena Forum