Task2.sh issue and task3.py

Hello,


The task2.sh file is not found, what should I do. I did give .sh file the permission using

And My task3.py works as expected but grader said image

Thank you

Hi @xj2106,

Welcome to our community.

For the first problem, related to task2.sh, your are using home/user/etc, but you forgot the slash “/” before home. It has to be “/home/user/etc”

Remember that when you do not start with a slash, it is a relative path. For an absolute path, please remember to add the “/”.

And for the task3.py, most of the times that the correction complains is because in the instructions you are told not to call the functions that are defined. I would recommend you double-checking the instructions, checking whether you’re instantiating a class or calling a function when the instructions tell you not to do it when submitting the quiz.

1 Like

Thank you so much! @ralves

I solved task2.sh problem, and I did check the instructions for task3.py again. I do not understand what you said, “you are told not to call the functions that are defined” I have messaged you my task3.py code. Can you kindly check it for me plz?

Hello @ralves , I can use bash /home/user/catkin_ws/src/linux_exam/task1.sh and task2.sh right now


but grader can not execute it with error message below

Hi @xj2106 ,

For task1.sh I see in your script that you are printing a “RED exclamation mark”. This certainly affects the script because you certainly have inserted some code to make the exclamation red, but our correction script is looking exactly for the “This bash script has finished!” text.

Please follow the instructions strictly in order to pass the tests.


With regards to task3.sh, please make sure your script has the correct if statements:

if [ "$var" == "big_square" ]
then do_something
fi

I would recommend you adding some “echo something” to your script when testing it, to make sure it works as expected. Only when you see it works as expected, you submit to correction.

Also, pay attention also to the spaces BEFORE and AFTER the “==” signal.

1 Like

@ralves Thank you so much. Can you please take a look at my Task3.py code? I sent you a message.

Hi @xj2106, I checked the code you sent, and I see the get_laser_readings is returning the values in the wrong order.

Please refer to the post below:

1 Like

Thank you so much @ralves I got 10/10 now. ROS is so interesting and I will keep learning!

1 Like