-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Joint to Axis Translator #3544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I guess that this would be for situations where the system builder is not the system user? |
Exactly. "Joint 0 fault" never seems to make sense to our operators, this just adds a message that maps it to Joint X Fault. And assuming someone wants to use this with non trivial kinematics it allows for weird mapping. I can change it to either - or _, is there a preference? |
File names have to use underscores but the (not well followed) policy is that HAL pin names should use hyphens. This leads to the unfortunate position where "loadrt name_with_underscores" will create HAL pins with names such as "name-with-underscores.00.number-of-hyphens" https://linuxcnc.org/docs/html/hal/general-ref.html#sec:hal-gr:naming-conventions |
halcmd: loadrt joint_axis_mapper coord=XXYZ
Note: Using POSIX realtime
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
4 bit IN FALSE jam.X-fault
4 bit OUT FALSE jam.X-fault-latched
4 bit IN FALSE jam.X2-fault
4 bit OUT FALSE jam.X2-fault-latched
4 bit IN FALSE jam.Y-fault
4 bit OUT FALSE jam.Y-fault-latched
4 bit IN FALSE jam.Z-fault
4 bit OUT FALSE jam.Z-fault-latched
4 s32 OUT 0 joint_axis_mapper.time |
Documentation is missing. Automatic compiling in same "make file" is missing too. I'm writing this here so it won't be forgotten. The component looks interesting, but I haven't figured out what it's for. Is it a replacement for kinematics, or a supplement to kinematics? |
See the first comment. It's just to add a fault message when Joint 0 faults - which axis is that? Most of our machinist don't understand Joints but every single machinist knows what the XYZABC axis are. Arent .comp files auto compiled? If not why not? Sounds like a lot of redundant make files? |
I read it, but I didn't understand it. Is this component also usable for trivkins or just for some special kinematics? Do you have any example of its use? Nobody will look for documentation for the HAL component in a Pull Request. Everyone will look for it here:
I will test it tonight. |
.comp files are auto compiled. I apologize for confusing. I tested it. I don't know if it makes sense to deal with this, but there are a limited number of axes.
|
HAL components defined by a .comp create their own manpages. Unfortunately buildbot builds are failing at the moment so they new manpage hasn't made it to the docs server. This component exists as an option for a system integrator to give extra info to the machine operator in cases where these are two different people. It's entirely optional, as are most of the HAL components. |
Where is source for man page of this component? |
Well, it won't have much of a manpage, just the two strings. It would be better if the original commit included a "description" field. |
Happy? #3550 |
Seems that this produces a bunch of compiler warnings during the build process:
|
Also note that the Usage description does not match the pin name and it might be more intuitive to use 'joint.n.faulted':
should be
Just noticed that the axis letter in the created pins change from upper to lower case for 'coord=xyz' which is a bit unusual. |
I'm sorry to be going on about this but I cannot seem to get it to work. I'm testing on master using 'axis.ini' with this modification.
Note here that the component will error on load if there are spaces between the axis letters like in many of the simulation configs:
After homing I toggle 'jam.x-fault' to TRUE. |
Popup worked me in gmoccapy. |
Disregard. Of course I forgot the 'addf joint_axis_mapper servo-thread' |
I got rid of most of the compiler warnings:
Any ideas? |
__comp_inst is the (slightly hidden) macro that points to the component instance data. It might be related to option_singleton being set to "yes". It would be interesting to see if the same warning is seen compiling other "singleton" comps. If so then we might need to add a compiler macro to halcompile.g |
I get no warnings when compiling 'thc.comp' or 'plasmac.comp' which both have 'option singleton yes;':
|
Note though that the warning was resolved by adding this to the FUNCTION:
see related PR #3570 |
Open to comments.
Motivation is some guys can't memorize Joint 0 - X Joint 1 is Y etc. This is a brute force way off adding a popup for which Axis has faulted, while being flexible enough for a variety of kinematics.
The other options I seen for doing this was in one of the 3 modules:
So without adding spaghetti of plumbing those three modules I opted for a halcomp
Also naming things is hard... is this too generic of a name.?