Mobile robotics python

hello there, I’m trying to make a mobile robot change its turn speed to 0 when in less than 3m from the pick up so it doesn’t rotate when aproaching it. I’ve checked out the python and robots videos and forum questions but didn’t find a solution.
would apreciate help!