I am trying to solve the exercise 12, i am getting a bit stuck on the idea why the solution is like it is?
first the service of client server for determining if the obstacle is in front and figuring out wich way to turn, would it not be a better solution to do that inside a class? as from what i understand sending a request to the server and having the whole program wait for a response while the robot is driving, and it also adds another layer of communication, is this the best way, i mean is this what services would be best suited for? or am i just thinking of ros from an old arduino way where everything was done in one big program?
Would it not be better to use an action server if anything for this particular task and just use a normal while loop
while robot.has_no_obstacle_in_front: robot_contorller.cmd.liner.x = 0.5 robot_controller.publish_velocity_once() robot.check_for_obstacle() rate.sleep()
also would it not be better to check the 3 laser reading at [0, 360, 719] to check if there is anything in front, and then determine if the robot is out of the maze?
reason why i am asking is because i am trying to get my head in to the “right way” of thinking when it comes to ros (from what i peace together from online it is not the same way of thinking as building a whole robot on Arduino) so i don’t want to be stuck in my old ways sort of say