Option 1: Complete the Code Foundation for ROS learning path

Gradebot is taking a lot of time to check and mark test for option 1 certification

As per your request to keep the window/tab open I’m unable to continue with other courses since once another window/tab is open the marking window/tab is refreshed thus canceling the marking process

After a while away from the screen the marking stopped with the pop-up question “Are you still there?”
Please advise what to do in this case

Something is not right here. It should not take this long to mark that exam.

Could you please send a screenshot of where the exam correction is taking so long?

I have had a look at your code. It seems to be getting stuck at this point, based on the logs:

def main(self):
        # ...
        while self.get_front_laser() > 1.0:
            self.move_straight()                  
            #print (self.get_front_laser())
        # stopping the robot close to the wall

Kindly check that this condition can actually be false under certain conditions so the loop can be exited.

Hello,Thank you for your reply and review.

The code you quoted form is task 3.

I’ve checked task3 to see if it work and it did, the robot went outside the room.

During this check I’ve untaged the Hashtag from #print (self.get_front_laser())
and printed the distances.

I observed the reduce in the distance and then the following printout of the next steps.

Task3 is working when it runs on its own (using: python task3.py).

But still when submitting the exam gradebot get stuck.

Please advise what to do.

Thank you

It’s likely that you are not detecting the lasers correctly.

You should check for inf values for:

  • front laser reading, when the robot is at the opening.
  • left and right laser readings when the robot is out of the room.

In short, your code should check for inf values otherwise you could have this kind of deadlock.

Hello,

Thank you for your reply and review.

I’ve checked task3 again separately from other tasks and exam

Task3 is working (using: python task3.py) and the robot perform the mission

Can you please elaborate where the inf value check is required since task3 does not get stuck runnig outside the exam

Please advise what to do.

Thank you

Please one more thing

Just want to make sure I’ve explained myself properly.

I’m not referring to the errors (No mark, in red), mistakes can happen.

I’m referring to the infinite process during task3 check.

Thank you

The inf check is required for tasks 2 and 3.

inf is what indicates that the sensor cannot sense any obstacle (or that the obstacle is beyond its sensing range). So you need to check for inf readings in order to detect when the robot:

  1. is facing the opening of the room (task 2)
  2. is completely out of the room (task 3).

Kindly also note that task 3 is supposed to take off from where task 2 ended (the robot already facing the room opening).

Regarding the infinite process during task3, can you check what this evaluates to when the robot is completely outside the room?

self.get_front_laser() > 1.0

Hello,

Thank you for your answer

Here is my response;

  1. Check for inf readings is performed by large values
    e.g. while self.get_right_laser() <= 10*laser_R_set:

  2. Attached print screen from the code and the shell
    In red frame you will find the laser reading you requested.
    Also you can see that the condition is valid and while loop in logic since the code continues.
    The print (“Stop, I’m close to the wall”) is presented in the shell

  3. Regarding the infinite process during task3, evaluates when the robot is completely outside the room

self.get_front_laser() > 1.0

The robot is going outside the room (see picture. robot area), the robot stops and the codes stops and exits (see picture, shell area)
this condition is not performed at all after exiting the room and in fact not after turning toward the exit.

I’m well aware that the robot is not starting task3 from task2 finish point but it may well be a mistake but not code error that makes the check process to get stuck.

Thank you

Hi @TAURD ,

I have completed the Code Foundation Quiz and have received 100% at my 18th attempt (yes, you read that right - at my 18th attempt). Reason: Even I got stuck at task3.py for 17 attempts.

So I believe that I can help you out! Good news for you is that there was a problem with the gradebot/autograder and that was fixed by @bayodesegun upon my request. Please refer post : Linux/Python Prerequisites Exam - Autograder Stuck at last step

I read this entire post, so decided to help you out since you seem to be stuck for more than 10 days(?).

  1. You can check for infinity values with python simply by if var == float(“inf”) or if var != float(“inf”).
  2. For task1.py you must get all the readings except inf values and report the maximum and minimum of non-inf values.
  3. For task2.py just reset your simulation, move as far as the front wall and stop within 1 meter and just turn 90 degrees (roughly - need not be exact 90 degree) to face the exit.
  4. VERY IMPORTANT task3.py starts off from the final position of task2.py. Just create the two functions get_laser_readings() and main() working. Make sure when you have exited the room / walls and all your laser scan values read inf as ranges.

If all the above are working, the gradebot/autograder will succeed. As it did for me!

Let me know if I helped you!

Cheers,
Girish

THANK YOU!!! Girish

I hope this is enough to get the certificate.

1 Like

Hello,

i assume that by achieving the score of 8.5 point I’m eligible to get a certificate in the Code Foundation for ROS learning path.

Where should I find it

Also your attention that I’m the teacher in this account in our academy package and my name is not TUARD.
please verify that my name is on the certificate (personal details will be provided privately)

Thank you all for the support

Hi @TAURD ,

Glad to know I helped you! :smile:

You have infinite attempts, so why take the certificate now if you can improve your score?

By the way, your score will not be printed on your certificate, I believe. So, improve your answers, get a 100% and request TheConstructSim team to update your score (this step is only for your satisfaction) and then you can get your certificate.

You can find your certficates on this page: Learn Robotics from Zero - Robotics & ROS Online Courses
Click on your profile image on top right corner and select “Accomplishments”. You will find them here.
(OR)
Go directly to Accomplishments page: Learn Robotics from Zero - Robotics & ROS Online Courses

Cheers and Best of Luck with future courses.
Girish

@TAURD

Also, I am not a part of The Construct Team. I am also another student in this website :grin:.
I was able to help you because I just completed the same exam a few days back.

Regards,
Girish

1 Like

Please update your real name on the app in this link and I’ll reset your certificate after that.

Current it was generated with TAU RD, the first and last names currently on your account.

Done

Real name is in the system

Thank you

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.