Hello,
At first my script seems to work correctly and makes the robot move according to the input argument but then it seems to do the other 2 as well am I missing something?
var=$1
if [ $var="big_square" ]
then rosrun linux_exam big_square.py
fi
if [ $var="medium_square" ]
then rosrun linux_exam medium_square.py
fi
if [ $var="small_square" ]
then rosrun linux_exam small_square.py
fi
also for task1.py it wants me to create an instance of RobotClass but I wasnt given the files necessary to import?
it’s recommended to use the variables inside double-quotes, like "$var" when checking their values, because if for any reason the variable is evaluated as empty, your script would raise an error.
And for the RobotClass, in the instructions and previous examples, you should be able to see how to import it.
Please let us know if you are still having problems.
Okay i’ll try that but for the RobotClass part, i know how to import it but i just dont have the code, should i go to a past course to just copy paste like normal?