Hello,
I need to make conversion from xyzwpr position to joint representation. As far as i know Karel is only chance to do this inside of program. So I wrote following program, but it doesn't work (even it is very similar to program mentioned in Karel manual). Trouble is with line j_pos=xyz_pos. When I run this program in Roboguide I get MOTN-018 Position not reachable (G:0) error or stack overflow error, when I use it with real robot then it generates INTP-311 Uninitialized variable. Does anybody know where is trouble? It's R30iB controller with 8.30P/30 software.
Thanks for help
Tomas
PROGRAM XYZ_TO_JOINT
VAR
xyz_pos :XYZWPR
j_pos :JOINTPOS
STATUS :INTEGER
BEGIN
xyz_pos=GET_POS_REG(10,STATUS,1)
j_pos = xyz_pos
SET_JPOS_REG(11,j_pos,STATUS,1)
END XYZ_TO_JOINT