I have an installation with vision equipment where a PC sends the pick point positions to the robot, and I need to limit the axis 6 maximum range to -180 to 180 degrees due to cable management.
Currently I am checking with a karel if robot can move safely to pick the piece, checking the previous, the pick point and also some points on the path to check if motion will be done without reaching an axis limit and also if it can enter and exit safely
Even forcing the axis 6 turn value of all points to 0, sometimes axis 6 exceeds the +-180 range, probably due to the need to just use a linear movement betwheen the previous and destiny pick point. (its spaced 250mm apart but probably when near singularity this can happen)
Is there a way to just limit the maximum range from an axis but also that the check_epos karel function returns 0 if out of limits?
An idea I have is to convert from cartesian pos to epos and check the axis6 value of all points before moving to pick a new part, but as the last movement is linear I don't think the obtained axis6 value will be real... I need a way to check if the turn config will be changed when performing that linear movement, because if I can see that before performing the movement, I can just discard the pick point and just go for another piece.
Any help would be appreciated. Thx a lot.