Topics Quiz : grading issue

Hi, I am attempting the quiz however I am getting zero although I have been following through with the instructions. I have attempted 3 times but still could not figure out what’s wrong. Please help!! My code has been working and I have also checked using the launch files. I still could not figure out why the grader has been giving zero.
I am also attaching a photo of my file structure for that matter.
file_structure_topics_quiz

1 Like

Hi, welcome to the community¡

Can you please check if all of your processes are shut down in the terminals? Also, the structure looks good, but also make sure that your node is called topics_quiz_node.

Let me know if this doesn’t work to take the proper corrective actions on our side.

Hi, I am in unit 9 Action Server Quiz. To be honest, I have also been experiencing this issue not only once but during the quiz. If I remember correctly, the previous quiz is about the server quiz. I followed all the instructions including the naming of the files, nodes, package etc. I have also terminated all of my web shells beforehand and in my unit 9 quiz, I have made sure that the drone is not flying. Yet, I still got a 0 nonetheless. Will this somehow affect me to get my certificate as I have obtained two zeros in my quiz? Also, is ctrl + c enough to terminate my programs in the webshell?

Here’s a screenshot to show that I followed exactly as mentioned in the quiz :

Please correct me if im wrong

I read the solution and it turns out that my code is generally the same as the solution. Although I feel like the code in the solution is much cleaner than mine, but whenever I tried to run my simulation, it works just fine like how the solution does. At the very least, I should be able to get some points, right?

I hope you can look into this issue :smiley:

Thank you in advanced!

No, it does not work and all the processes are shut down as well the node is named “topics_quiz_node”. Also, I now have only one chance remaining. Please look into it.

I apologize for this issue. We are currently working on a fix and will let you know as soon as possible.

1 Like

Thanks for the reply and kindly let me know whether the issue has been fixed.

I have now finished the Beginner programming course, and looks like my score is really low. I’ve only realised now that there is this score board that keeps track of my score and that the beginner’s course weights 25% of the total.

Is there any way I could possibly re-do it? Also, thank you for the reply!

Hi @somikdhar327 and @WhenOwlsHoot

We just did a new deployment.

Could you try to submit the quiz again?

Please let us know if the problem still happens to you.

2 Likes

Thanks, it’s working. But there was an issue with my program to avoid obstacles. Is it possible to submit one more time as some of the trials were wasted due to technical glitches? I have still not looked into the solution and am hoping to do some corrections to get it done right.

Also, can you tell what might be wrong with the following code as in the simulation it is avoiding the walls?

#! /usr/bin/env python

import rospy

from geometry_msgs.msg import Twist

from sensor_msgs.msg import LaserScan

pub = None

def callback(msg):

# 720 / 3 == 240

regions = {

    'right':min(min(msg.ranges[0:239]), 30),

    'front' :min(min(msg.ranges[240:479]), 30),

    'left': min(min(msg.ranges[480:719]), 30)

}

action_taken(regions)

def action_taken(regions):

msg = Twist()

linear_x = 0.0

angular_z = 0.0

if regions['front'] > 1:

    linear_x = 0.5

    angular_z = 0.0

elif regions['front'] < 1:

    linear_x = 0.0

    angular_z = 0.5

elif regions['right'] < 1:

    linear_x = 0.0

    angular_z = 0.5

elif regions['left'] < 1:

    linear_x = 0.0

    angular_z = -0.5

else:

    rospy.loginfo(regions)



msg.linear.x = linear_x

msg.angular.z = angular_z 

pub.publish(msg)

def main():

global pub

rospy.init_node("topics_quiz_node")

pub = rospy.Publisher('/cmd_vel',Twist,queue_size = 5)

sub = rospy.Subscriber('/kobuki/laser/scan',LaserScan,callback)

rospy.spin()

if name == ‘main’:

main()

It looks like I am still unable to submit another attempt as I have used up all of my trials.

Can you look into my code and tell me where it is getting wrong? Also as I have not seen the solution, is it possible to get one more chance for submission as some of my chances were missed due to technical glitches.

You now have one more attempt due to the issues we had two days ago. As for the code, can you please share it with the correct format? It’s hard to spot problems as it is now. I don’t understand

Do you mean that the program is doing what it’s supposed to but not grading it correctly? If so, again make sure that all of your processes are killed in all 4 terminals.

I have added an extra trial because of the technical error we had. Please try again.

The program is correctly avoiding the walls. In the program after avoiding the wall, the robot moves on forward indefinitely. Do I need to make the robot stop after performing the action? Can you elaborate as I may have inferred the task in the other way round?

Nope, still the same.

I’m sorry, now you can try again.

The program is correctly avoiding the walls. In the program after avoiding the wall, the robot moves on forward indefinitely. Do I need to make the robot stop after performing the action? Can you elaborate as I may have inferred the task in the other way round?

No worries, it works perfectly fine now! Thank you so much for the help and quick response!

1 Like

Perhaps your robot is avoiding the wall too early? You need to let the robot get as close as specified in the instructions for the quiz, before making it turn.

I’ve added two more trials for you.