Hello
Looks like I’m having some gremlins in my ROS.
While trying to build my escape for the robot out of the labyrinth I’m having problem with the rotate function in the RobotControl. I did copy/paste the updated robot_control_class from Unit 6. I even used @flarribagil code that he posted in his problem post just to see and it’s exactly the same reaction.
Here is what’s happening, I move forward to the first corner and try to rotate to the right 90’ but instead the robot rotates 180’ (facing back to where it came from) and just rotates back and forth about +/-10’ until I hit CTRL+C, at which point it just starts rotating 360’ counter-clockwise until I reset the simulation.
The following is the error message from terminal:
Traceback (most recent call last):
File "Ex_6_microproject.py", line 29, in <module>
firstturn.turns()
File "Ex_6_microproject.py", line 24, in turns
self.rc.rotate(self.rotate)
File "/home/user/catkin_ws/src/robot_control/robot_control_class.py", line 175, in rotate
self.rate.sleep()
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 103, in sleep
sleep(self._remaining(curr_time))
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 165, in sleep
raise rospy.exceptions.ROSInterruptException("ROS shutdown request")
rospy.exceptions.ROSInterruptException: ROS shutdown request
I did try to copy/paste again the robot_control_class just to make sure I eliminate any coping issues.
Any ideas on what I can check? Thanks