This paper describes a robotic application that tracks a moving object by utilizing a mobile robot with sensors and image processing. The robotic platform uses a visual camera to sense the movement of the desired object and a range sensor to help the robot detect and then avoid obstacles in real time while continuing to detect and follow the desired object. In terms of real-time obstacle avoidance capacity, this paper also presents an algorithm for this robotic application specifically. Experimental results show that the robotic and intelligent system can fulfill the requirements for detecting an object and avoiding obstacles simultaneously.