Topics_quiz at end of ROS Basics Part 2 - please clarify

I’m going through ROSBasicsIn5Days python course and there’s a quiz at the end of section 2 that has me blocked. The problem states that the program should read the laser scanner value, detect if a wall is less than 30m straight ahead, and change directions so “at the end” it isn’t facing the wall.

Simple enough. I’ve built a test app that randomly moves the robot around and varies in turn rate as well as speed. Also, based on the very beginning instructions I went into rviz, added a LaserScanner and had it post values to “/kobuki/laser/scan” topic. Then I took the mid-point of the ranges array and use that to determine which way to turn. So I have all the basics worked out.

A few things, though::

  • This LaserScanner returns values around 1.0-3.0 and if there’s no wall the value returned is ‘inf’ – my code looks for these ranges of values but the quiz description says:

“The laser has a range of 30m. When you get readings of values around 30, it means that the laser isn’t detecting anything. If you get a value that is under 30, this will mean that the laser is detecting some kind of obstacle in that direction (the wall).”

Does this mean the quiz evaluation LaserScanner is some other type of laser scanner – and one for which we can’t really test our code?

  • In all the examples provided so far there’s a ‘loop until interrupted’ model where the robot continues doing things and we hit Ctrl-C to break the loop. In the quiz it’s stated that:

“By avoiding the wall, we mean that at the end of the program, the robot will NOT HAVE the wall IN FRONT of it anymore.”

The part that’s confusing me is “at the end of the program” part. Does this mean our quiz version shouldn’t be in an infinite loop? Should it scan until it gets a front value less than 30, then trigger a change in direction then stop? Should it wait until range is over 30 then stop? Should it be in an infinite loop and each time it gets a range below 30 it rotates and heads a different direction?

In other words is this going to be a one-shot thing or a continuous one? And should the robot actually stop when we’ve changed direction or continue going and the app just breaks out of its loop?

  • By “NOT HAVE the wall IN FRONT of it” – does this mean just turning the robot around is sufficient? It could also reverse direction to go backward and get out of range of the wall. It says “NOT HAVE the wall IN FRONT of it anymore” but that could mean turn away from the wall or move back far enough so it’s not sensed any more. Which should it be?

  • Finally, it says once you’ve submitted the answer you can’t go back and re-submit. I know it’s just a quiz and I’m likely totally overthinking this whole thing, but that’s a lot of pressure to make sure the answer is 100% correct on the first try. Which is why I’m asking all these silly questions. Would be good if the questions were more clear or there was a chance to try things out before submitting a final answer.

I’m not one of those who frets too much about tests, but for some reason this one’s got me anxious to get it 100% right.

Damn you, you laughing evil robot quiz evaluator! :slight_smile:

1 Like

Hi @framin,

Thank you so much for your feedback; we really appreciate taking the time and effort to compose such a comprehensive note! Your feedback will really help us to improve the “laughing evil robot quiz evaluator” :wink:.

Now to your concerns…

I agree that we really need to clarify this part. Apologies for this confusion. The problem here is that in real life, the range is 30m, but in “simulated life”, the range is 3.0. So please write your code to consider 3.0 as the range.

I agree also that this need to be clarified. What we expect is that:

  • The robot would initially move towards and detect the wall.
  • The robot would avoid the wall when it gets “too close for comfort” (as you dim fit) by turning right or left.
  • The robot would keep going after turning and would no longer detect the wall. If done this way, the robot would just keep going forever, because there’s no more obstacle. We are not expecting you to stop the robot as part of the quiz. PS: I’m not sure if stopping the robot would not upset the robot quiz evaluator, so better play safe until otherwise advised :slight_smile:

I completely understand your concerns! Please proceed as follows

  • Write your program to move the robot as described above.
  • Test your quiz locally and see if it moves accordingly.
  • Submit your quiz. If you don’t get the expected score, please let us know and we’ll check what went wrong. We’ll bring the robot quiz evaluator to trial and allow you to re-submit the quiz!

Thank you again for your feedback. We look forward to hearing from you again!