- Posts: 114
- Thank you received: 0
robot joint offsets required to overcome internal absolute encoder
4 years 2 months ago #249821
by ftree
Hi!
I now have the DH params working well.
However as LinuxCNC does not see theta values I need to offset joint1 by 90 degrees at startup so that the robot posture is a true representation to the encoders or real word position/posture. I can't do G5* as internally the robot limits movement to -70/+90. I need to add 90 to the encoder value before it gets to joint.1.motor-pos-fb - is there some motor or other offset feature in the ini file I can use here?
Best practice for this?
I now have the DH params working well.
However as LinuxCNC does not see theta values I need to offset joint1 by 90 degrees at startup so that the robot posture is a true representation to the encoders or real word position/posture. I can't do G5* as internally the robot limits movement to -70/+90. I need to add 90 to the encoder value before it gets to joint.1.motor-pos-fb - is there some motor or other offset feature in the ini file I can use here?
Best practice for this?
Attachment not found
Please Log in to join the conversation.
4 years 2 months ago #249824
by ftree
can i use this somehow with a fake encoder for sim?
Replied by ftree on topic robot joint offsets required to overcome internal absolute encoder
Code:
loadrt sum2 count=1
addf sum2.0 servo-thread
setp sum2.0.in0 90.0
net a2-enc-fb => sum2.0.in1
net a2-enc-fb-os <= sum2.0.out
can i use this somehow with a fake encoder for sim?
Please Log in to join the conversation.
4 years 2 months ago #249826
by andypugh
Replied by andypugh on topic robot joint offsets required to overcome internal absolute encoder
I don't think that you need a fake encoder, just use the sum2 output where needed.
Please Log in to join the conversation.
4 years 2 months ago #249831
by ftree
Replied by ftree on topic robot joint offsets required to overcome internal absolute encoder
setp a2-offset.offset 90
net a2-pos-cmd joint.1.motor-pos-cmd a2-offset.in
net a2-pos-cmd-comp a2-offset.out
net a2-pos-fb-comp a2-offset.fb-out joint.1.motor-pos-fb
# --- closedloop signals ---
net a1-pos-cmd joint.0.motor-pos-cmd => joint.0.motor-pos-fb
# net a2-pos-cmd joint.1.motor-pos-cmd => joint.1.motor-pos-fb
net a3-pos-cmd joint.2.motor-pos-cmd => joint.2.motor-pos-fb
net a4-pos-cmd joint.3.motor-pos-cmd => joint.3.motor-pos-fb
net a5-pos-cmd joint.4.motor-pos-cmd => joint.4.motor-pos-fb
net a6-pos-cmd joint.5.motor-pos-cmd => joint.5.motor-pos-fb
net a2-pos-cmd joint.1.motor-pos-cmd a2-offset.in
net a2-pos-cmd-comp a2-offset.out
net a2-pos-fb-comp a2-offset.fb-out joint.1.motor-pos-fb
# --- closedloop signals ---
net a1-pos-cmd joint.0.motor-pos-cmd => joint.0.motor-pos-fb
# net a2-pos-cmd joint.1.motor-pos-cmd => joint.1.motor-pos-fb
net a3-pos-cmd joint.2.motor-pos-cmd => joint.2.motor-pos-fb
net a4-pos-cmd joint.3.motor-pos-cmd => joint.3.motor-pos-fb
net a5-pos-cmd joint.4.motor-pos-cmd => joint.4.motor-pos-fb
net a6-pos-cmd joint.5.motor-pos-cmd => joint.5.motor-pos-fb
Please Log in to join the conversation.
4 years 2 months ago #249832
by ftree
Replied by ftree on topic robot joint offsets required to overcome internal absolute encoder
then join up a2-pos-fb-comp with gui?
net :j0 <= joint.0.pos-fb => pyvcp.joint0 => meca500gui.joint1
# fix me change to a2-pos-fb-comp ??
net :j1 <= joint.1.pos-fb => pyvcp.joint1 => meca500gui.joint2
net :j2 <= joint.2.pos-fb => pyvcp.joint2 => meca500gui.joint3
net :j3 <= joint.3.pos-fb => pyvcp.joint3 => meca500gui.joint4
net :j4 <= joint.4.pos-fb => pyvcp.joint4 => meca500gui.joint5
net :j5 <= joint.5.pos-fb => pyvcp.joint5 => meca500gui.joint6
#net :vismach-clear <= pyvcp.vismach-clear => vismach.plotclear
Sadly I don't understand the arrows too well here in this postgui. How can I link up a2-pos-fb-comp to :j1 else it picks up the non compensated value I think.
net :j0 <= joint.0.pos-fb => pyvcp.joint0 => meca500gui.joint1
# fix me change to a2-pos-fb-comp ??
net :j1 <= joint.1.pos-fb => pyvcp.joint1 => meca500gui.joint2
net :j2 <= joint.2.pos-fb => pyvcp.joint2 => meca500gui.joint3
net :j3 <= joint.3.pos-fb => pyvcp.joint3 => meca500gui.joint4
net :j4 <= joint.4.pos-fb => pyvcp.joint4 => meca500gui.joint5
net :j5 <= joint.5.pos-fb => pyvcp.joint5 => meca500gui.joint6
#net :vismach-clear <= pyvcp.vismach-clear => vismach.plotclear
Sadly I don't understand the arrows too well here in this postgui. How can I link up a2-pos-fb-comp to :j1 else it picks up the non compensated value I think.
Please Log in to join the conversation.
4 years 2 months ago #249835
by andypugh
Replied by andypugh on topic robot joint offsets required to overcome internal absolute encoder
The arrows don't do anything, so don't worry about them.
I am not sure about using colons in the signal names.
You don't seem to have the actual encoder feedback anywhere in the nets.
I am not sure about using colons in the signal names.
You don't seem to have the actual encoder feedback anywhere in the nets.
Please Log in to join the conversation.
4 years 2 months ago #249836
by ftree
Replied by ftree on topic robot joint offsets required to overcome internal absolute encoder
this error out and shuts down
net :j1 <= a2-pos-fb-comp => pyvcp.joint1 => meca500gui.joint2
net :j1 <= a2-pos-fb-comp => pyvcp.joint1 => meca500gui.joint2
Please Log in to join the conversation.
4 years 2 months ago #249837
by ftree
Replied by ftree on topic robot joint offsets required to overcome internal absolute encoder
hi andy, i'm trying to set this up in sim mode. maybe going about it all wrong way.
Please Log in to join the conversation.
4 years 2 months ago #249839
by ftree
Replied by ftree on topic robot joint offsets required to overcome internal absolute encoder
kinematics fail using offset, back to the drawing board
Please Log in to join the conversation.
4 years 2 months ago #249840
by ftree
Replied by ftree on topic robot joint offsets required to overcome internal absolute encoder
We need a way to add back into the system the "theta" values for following so the robot poses correctly in sim and kinematics work correctly.
theta j1= neg 90
theta j5 = pos 180
I am open to guidance on how to achieve this in both sim and real. Thanks!
theta j1= neg 90
theta j5 = pos 180
I am open to guidance on how to achieve this in both sim and real. Thanks!
Please Log in to join the conversation.
Time to create page: 0.126 seconds
