Code Foundation for ROS exam

Hey!
I’m just starting out on your platform, I’m very impressed so far!
I’ve revently finished the prerequisites exam, although the code seems to work as expected I get 1.5/10. I followed the instructions very closely I even checked a couple of times to see if I missed something.

Is there an exam log to see what I did wrong?
Sorry if its another RTFM issue.

Hi @levdan159,

I’ve been checking the correction logs, and it seems that your task1.sh file doesn’t have the execute permissions. This is normally solved with:

chmod +x task1.sh

There are other problems in the logs, but they are probably related to this first error that I mentioned.

Hey @ralves !

Thanks a bunch!

Added execution premmisions to all the scripts, got 5.8/10 this time, seems I’m getting better!
Might be a problem with my code, but should work fine from what I see in my testing.
I’ll be continuing to ROS basics now, but would love to know what I’m doing wrong :slight_smile:

Hi @levdan159 ,

according to the last logs, there seems to be a problem in the constructor of a class.

Traceback (most recent call last):
  File "task3_correct2.py", line 3, in <module>
    ec = ExamControl()
TypeError: __init__() takes exactly 2 arguments (1 given)

In addition to that, the squares are reported as not being correctly done.

The highest value of the laser also was not correctly read, it seems.

So is it a problem with my code?

  • Added proper Shebang heading for each file.
  • Tweaked task3.py constructor class so it takes just one argument, just the class instance (self).
  • Changed the squares so it catches invalid input.
  • I noticed that I returned the max/min positions in task1.py in the wrong order, fixed.

Manged to lower my grade by 1 point !
The code still seems to work as expected.

Seems I also have a similar problem to :

I don’t get a report of what parts are wrong.

1 Like

Hi @levdan159,

there seems to be still problems with your constructors.

Traceback (most recent call last):
  File "task3_correct2.py", line 3, in <module>
    ec = ExamControl()
TypeError: __init__() takes exactly 2 arguments (1 given)

Also, when running task2.sh it gets:

./task2.sh medium_square
Enter a square to perform: No correct input was given! Try again.

The same happens with:

./task2.sh small_square
Enter a square to perform: No correct input was given! Try again.

I would highly recommend you to read carefully the quiz instructions again because it is an automated script that runs the correction, following what is said in the instructions.

Hi @levdan159,

we have been investigating why you were not receiving any feedback on which tasks of the quiz failed, and we found it was a problem in our system.

It is now fixed. If you submit the quiz again, now you should receive feedback while the auto-correction system is running.

Please let us know if you find any other problems, and thanks for reporting the problem.

Cheers,