Help Programming MBLOCK Robot?

I am trying to program an MBLOCK Ultimate 2.0 robot to detect an object 1/2 yard away, navigate to it, and then pick it up and place it back down. Here's my current code (the robot aligns itself with the object and then only moves forward very slightly).

#include "MeMegaPi.h"

// Private Variables
MeLightSensor lightSensor(PORT_8);
int value = 0;     

MeUltrasonicSensor ultraSensor(PORT_7);

MeMegaPiDCMotor motor1(PORT1A); // Left

MeMegaPiDCMotor motor2(PORT1B);

MeMegaPiDCMotor motor3(PORT2A); // Right

MeMegaPiDCMotor motor4(PORT2B);

MeMegaPiDCMotor motor5(PORT3A); // Gantry

MeMegaPiDCMotor motor6(PORT3B);

MeMegaPiDCMotor motor7(PORT4A); // The Claw!

MeMegaPiDCMotor motor8(PORT4B);

uint8_t motorSpeed = 75;

void setup() 
{
  // put your setup code here, to run once:
  // initialize serial communications at 9600 bps
  Serial.begin(9600);
}

void loop() 
{ 
  while(ultraSensor.distanceCm() >= 100) 
  {
      // Spin
      motor1.run(motorSpeed); // Right
      motor2.run(motorSpeed);
      motor3.run(motorSpeed); // Left
      motor4.run(motorSpeed); 
  }
  
      motor1.stop(); // Left
      motor2.stop();
      motor3.stop(); // Right
      motor4.stop();
      delay(1000);
      
  while(ultraSensor.distanceCm() <= 80 && ultraSensor.distanceCm() >= 17)
  {    
      motor1.run(-motorSpeed); // Right
      motor2.run(-motorSpeed);
      motor3.run(motorSpeed); // Left
      motor4.run(motorSpeed); 

  }
      // Claw! Close
      while(ultraSensor.distanceCm() < 17)
      {
        // Stop
      motor1.stop(); // Left
      motor2.stop();    
      motor3.stop(); // Right
      motor4.stop();
      
      motor8.run(80);
      delay(1000);
      motor8.stop();
      delay(1000);
      }
}

What is your question?

I want to know where the coding is incorrect causing the robot to stop rather than moving to the object

You have a while loop that runs the motors as long as the distance is greater than 100cm. If the distance is 99cm the while loop ends and the motors are stopped. They will never start again because the other two while loops will never enter with a distance of 99cm, the robot will do just nothing at that distance.

The first while loop spins the robot until it sees the object. The second while loop is the one that runs the motors to move forward while the object distance is between 80 and 20 cm from the sensor.

The first while loop spins the robot until it sees the object. The second while loop is the one that runs the motors to move forward while the object distance is between 80 and 20 cm from the sensor.

Yes, but you have no loop to control any action between 80 and 100cm. So the robot is simply doing nothing and waits forever because no condition will change as long as it's not moving.

I didn’t think that was necessary since the object is less then both 100 and 80 cm (it’s probably around 70 away).

I try to explain in another way:

Let's say your robot is at first 120cm away from the object. The sketch starts and it will stay in the first while loop (moving forward) until it reaches a point where it's 99cm away from the object. At this point the program leaves the firsts while loop. The following block stops the motors. The program logic now checks the condition of the second while loop, which is not matched as the current 99cm is more than the 80cm the while loop expects to be run. The program checks the condition of the third while loop which is also not met, so the loop block is not executed. The end of the loop is reached, so the routine starts from the beginning. None of the while conditions is met, so the only code block that executes it the stop of the motors.

Do you see why you robot stops at 1 meter and won't move anymore?