Making some axes independent of the motion controller

More
06 Dec 2018 19:58 #121986 by cogzoid
So, I've got a complex robot with 8 different axes. Some of the axes are critical to stay in lock-step with each other, and others can be way off the mark without crashing or causing problems. However, I currently have these set up in a "trivial" way and all axes are considered equally important.

Here's a link to what it looks like: www.forum.linuxcnc.org/show-your-stuff/3...r-in-progress#119406

Physically, here's a description of the setup:

All motion is angular and moving elements in the same plane.
X,Y,Z are the Shoulder, Elbow, and Wrist of the Arm
A, B are the Ferriswheel and "Tipper" to pour the booze
C is the Cocktail Shaker
U and V control the leaning of the eyeball and the robot's bowtie, both purely cosmetic elements.

What I'd love to implement is a system where X,Y,Z stay in lock-step and those values go to the motion planner. However, all the other elements can be independent and not figure into the calculations of speed, etc. They'll still need to obey their own velocity and acceleration limits, but I don't want them to impact the Arm's motions and vice-versa.

I'm looking at things like Free mode . But that seems to unlock all axes or none.
I feel like there's a way to define the kinematics to get what I need done [instead of trivkins], but the documentation doesn't seem to address the motion controller, and I'm not really trying to get everything defined in simple X or Y coordinates. I don't mind thinking in Degree of rotation for each joint.

Can anyone point me in the right direction?

Please Log in or Create an account to join the conversation.

More
08 Dec 2018 04:17 #122034 by cmorley
One idea:
You could operate the 'other' axes as HAL only (not involve the motion controller)
You could use m code to for instance move the eyes.

Chris M

Please Log in or Create an account to join the conversation.

More
08 Dec 2018 12:26 #122049 by newbynobi
hallo Chris,

could you share an example of moving a joint or axis only with hal?
I have tried to find a solution for a tool changer and used a addition axis for the changer and was forced to hide that one in my GUI.

I was not able to find a hal only solution.

IMHO LinuxCNC should offer a possibility to configure joints individually from axis and give the user the possibility to jog the additional joints through G-Code. Like G0 X 10 a command like G0 J3 10 (Jog joint 3 10 units). Unfortunately incorporatung that does exceed my knowledge by several 1000%

Norbert

Please Log in or Create an account to join the conversation.

More
08 Dec 2018 13:27 #122050 by cmorley
I meant moving a motor with HAL only, using custom Mcodes, not moving independent joints or axes.
Sounds like you mean moving independent motors though the motion controller.

Similar idea - using an mcode is less convenient - means you need to take care of everything - limits, acceleration. velocity etc.

Stepcof and pncconf uses this technique for axes testing - it doesn't involve the motion controller at all.
In pncconf's case it uses the single axis planner based from linuxcnc jogging code.

One of the problems of stuff like moving joints directly is we have ran out of symbols to represent objects. J for instance already is used, so we would need to teach linuxcnc context for symbols or some other scheme to discriminate.
Magic comments is one technique we use.

Chris M
Chris M

Please Log in or Create an account to join the conversation.

More
08 Dec 2018 21:16 - 08 Dec 2018 21:47 #122067 by Grotius
I have a similar idea for robots.
A robot that can follow external positions.
Its not for military purposes like oerlikon.

With the external offset branche this becomes very easy to do.
Each invidual axis can be controlled how user would like. Up to 16 axis and maybe more. Position control and optional kinimatic model can be done by the component. In fact a robot can reflect a human hand or something like that with linuxcnc. Its a very cool idea. And it looks very cool when its reflecting.

When you have installed external offset branche, you can test it for example in your postgui.hal file.

Warning: Spoiler!


In my case i have 3 item's to do a offset on a z axis, but could be any axis.
1. THC2.Zpos-in
2. THC2.Offset
3. THC2.Zpos-out

This code is outside of G-code. In fact you don't need any home point's or whatever. This code does in my case an offset in mm.
It can also be an offset for degrees or a interpolation combination between several axis. It does not matter. The external offset branche does exactly what you want without complaining.

The branche has nice features for tuning parameters. It is very very stable. I used it today for several hours cnc cutting. No issue's Super stable.
Last edit: 08 Dec 2018 21:47 by Grotius.
The following user(s) said Thank You: cogzoid

Please Log in or Create an account to join the conversation.

More
09 Dec 2018 21:31 #122117 by newbynobi
@grotius,

as far as i know external offset branch will only apply an offset to a known axis!
So how to handle 16 axis as you mentioned, if linuxcnc do only know 9 axis!

You code only shows a way to apply an offset to z and that is known.

How to move joint 4 and 5 on a XYZ trivial kinematics machine?

Norbert

Please Log in or Create an account to join the conversation.

More
11 Dec 2018 15:33 - 11 Dec 2018 15:33 #122217 by andypugh
The HAL "limit3" component is basically a complete motion planner in a HAL module.
linuxcnc.org/docs/2.7/html/man/man9/limit3.9.html

If you connect the output to a stepgen or PID then it will move a motor.

You can set the requested output value either with a custom M-code or net it to a G-code analogue output pin (there are 4 by default, but you can have more: loadrt motmod .... num_aio=64 ) linuxcnc.org/docs/2.7/html/man/man9/motion.9.html
Last edit: 11 Dec 2018 15:33 by andypugh.
The following user(s) said Thank You: HalaszAttila, cogzoid

Please Log in or Create an account to join the conversation.

More
15 Dec 2018 00:31 #122434 by cogzoid
Thanks everyone for some suggestions that can help me get started.

I'm in the process of setting up a second computer on my desk that I can use to do some testing. It's difficult to dig into this stuff when my computer is behind a functioning bar. :)

Please Log in or Create an account to join the conversation.

More
04 Jan 2019 01:20 #123444 by cogzoid
I've been reading up a bit on how to use Limit3, switch around the nets, send the signals to the stepgens on the board, etc. I'm starting to wrap my brain around the flow from the inputs all the way to the motors.

However, I'm wondering a few things, and maybe someone can point me in the right direction and save me some time on my search.

Is it possible to use G codes to push around the joints? Or do I have to use custom M codes ? Having 100 specifically coded waypoints would probably suffice for my uses actually. Each of the non-arm elements of my robot aren't really that picky. However, this would require quite a change in how we program our robot. But, maybe that's not so bad in the long run... Hmmm....

Is it possible to Home these joints that don't go through the motion controller? That might be a non-starter if that's the case.

This is getting into the nitty gritty here and going through source code is slow going for me, and this stuff isn't always clear from the documentation.

Please Log in or Create an account to join the conversation.

More
04 Jan 2019 01:36 #123447 by cogzoid
I just reread the documentation on M-codes and realized that I can send parameters through to them, so it won't be that big of a change from the G-code version... Now I just need to figure out how the homing will work.

Please Log in or Create an account to join the conversation.

Time to create page: 0.107 seconds
Powered by Kunena Forum