Mobile robot is an automatic vehicle with wheels that can be moved automatically from one place to another. A motor is built in its wheels for mobility purposes, which is controlled using a controller. DC motor speed is controlled by the proportional integral derivative (PID) controller. Kinematic modeling is used in our work to understand the mechanical behavior of robots for designing the appropriate mobile robots. Right and left wheel velocity and direction are calculated by using the kinematic modeling, and the kinematic modeling is given to the PID controller to gain the output. Motor speed is controlled by the PID low-level controller for the robot mobility; the speed controlling is done using the constant values Kd, Kp, and Ki which depend on the past, future, and present errors. For better control performance, the integral gain, differential gain, and proportional gain are adjusted by the PID controller. Robot speed may vary by changing the direction of the vehicle, so to avoid this the Social Spider Optimization (SSO) algorithm is used in PID controllers. PID controller parameter tuning is hard by using separate algorithms, so the parameters are tuned by the SSO algorithm which is a novel nature-inspired algorithm. The main goal of this paper is to demonstrate the effectiveness of the proposed approach in achieving precise speed control of the robot, particularly in the presence of disturbances and uncertainties.