Hi, I am trouble finishing quiz 1 on the ROS 5 days course. I have the publisher and subscriber part done, but I am having trouble with the laser scan part. I can get the values, but I cannot use them to move the turtlebot.
Also, it would not let me use if statements for the twist function, and I do not know why. I understand what I was taught as far as publishers and subscribers, but I cannot figure out how to read my laser values, and then make the turtle bot move accordingly. It also will NOT let me use the robotcontrol() function that would allow me to get the laser and move. Attached below is my code, please let me know how to do this.
Code for quiz 1:
(scrubbed )
Code for using the robotcontrol() function that makes everything easy, but can’t use:
(scrubbed )