In a Karel program when CURPOS(0,0) is it by default in the world frame w/o setting any Karel frames?
In a Karel program when CURPOS(0,0) is it by default in the world frame w/o setting any Karel frames?
-
dnaumann -
June 28, 2023 at 9:27 PM -
Thread is Unresolved
-
-
Hi dnaumann,
the two parameters are
• axis_limit_mask specifies which axes are outside the axis limits.
• ovr_trv_mask specifies which axes are in overtravel.
And
• Returns the current position of the tool center point (TCP) relative to the current value of the
system variable $UFRAME for the specified group.
Best regards
-
I use the following code to get the current position in the current user and tool frames:
Code$GROUP[1].$UTOOL = $MNUTOOL[1,$MNUTOOLNUM[1]] $GROUP[1].$UFRAME = $MNUFRAME[1,$MNUFRAMENUM[1]] currentPos = CURPOS(0,0)
I suppose you can do the following to get the position in some particular frames (in this case UF3 and TF3):
If you want to convert the point to world frame, you can do the following: