Hi,
I’ve been trying to finish the prerequisite exam to get the accomplishment, however, despite trying to follow the specifications very precisely, several of the tasks fail while grading. This is despite all the tasks being performed, to my knowledge, correctly. Also, the grader only manages to get this far in the process before it just hangs/freezes. I’ve let it sit for 30 mins and no progress.
Could you please look into this? I’ll add the relevant code from the failed tasks:
All the best.
small_square.py:
#!/usr/bin/env python
import rospy
from robot_control_class import RobotControl
rc = RobotControl()
while not rospy.is_shutdown():
rc.move_straight_time("forward", 0.7, 1)
rc.turn("clockwise", 1,1.49)
task2.sh:
#!/bin/bash
strval1="small_square"
strval2="medium_square"
strval3="big_square"
#Check equality two string variables
if [ $1 == $strval1 ]; then
echo "Running small_square program!"
rosrun linux_exam small_square.py
fi
if [ $1 == $strval2 ]; then
echo "Running medium_square program!"
rosrun linux_exam medium_square.py
fi
if [ $1 == $strval3 ]; then
echo "Running big_square program!"
rosrun linux_exam big_square.py
fi
task1.py:
#!/usr/bin/env python
from robot_control_class import RobotControl
def get_highest_lowest():
instance = RobotControl()
scan_data = instance.get_laser_full()
l = scan_data
minimum = l[0] # first input
maximum = l[0] # first input
# minimum loop
for number in l:
if number != float("inf") and number != float("-inf"):
if minimum > number:
minimum = number
min_index = l.index(minimum)
# maximum loop
for number in l:
if number != float("inf") and number != float("-inf"):
if maximum < number:
maximum = number
max_index = l.index(maximum)
return max_index, min_index
#get_highest_lowest()