I am using your code (LUA code for search and rescue) in which a robot is moving towards other robot based on negative and positive angle. Actually there are two functions where in first function the robot detect the location of front robot and get length and angle with that robot. While in second function it set velocity based on previously obtained length and angle. With positive angle it turns towards other robot with following code.
Code: Select all
lvel = length * (1 - 2 * angle / math.pi)
rvel = length
But in case if robot get negative angle with other robot than it moves towards other robot with following code.
Code: Select all
lvel = length
rvel = length * (1 + 2 * angle / math.pi)
How can we make gripper towards the front robot particularly with negative angle.?
Thanks and Best Regards