[tf]different laser position for obstacle avoidance
Hi all,
Currently I am following this tutorial to implement the wall following algorithm,
During the wall following stage, I need to do the obstacle avoidence.
When the laser position is puttedd on the center of the robot,
Its simple to know robot hits obstacle when one of laser range is smaller than robot radius.
But when it move front about 10cm.(because of the robot design)
It becames difficult to calculate the obstacle distance.
I have some simple ideas about this problem:
(1) correct every laser ray by multiple some coeffcients (sin, cos..)
- cpu loading too high?
(2) use other senor (ultrasonic, ir...etc) and put on the side of robot
- may have some blind range?
(3) custom a costmap to calculate the obstacle distance from robot
- resolution need to 0.5cm, is it possible?
Does anyone know how to do obstacle when laser position is not on the center of robot?
Thanks!
Were you able to compile the code from the tutorial i keep getting errors with the #i which also look very weird to me.
@gijsje170
the code has some "style", after correction it should be fine.
ex:
rangeslink -> ranges[i],
diffE = (distMin - wallDistance) - r -> diffE = (distMin - wallDistance) - e
Hi thanks for your response i was able to compile the code but it just keeps driving circles maybe the FOV of my kinect is just to small with just 58 degrees?
Hi, @gijsje170
Tutorial senario is a 360 laser on the center top of the robot.
and calculate the distance between robot and wall,
so if your want use kinect, the kinect might be set to face wall.
also with some code modification, you should able to do wall following alg.