Week 8.5 - Wall-following behaviour
One of the fascinating behaviors exhibited by robots, is wall following. This behavior involves a robot autonomously navigating along a wall or obstacle, adjusting its movements to maintain a constant distance from the obstacle while continuing its path. In this blog post, we'll delve into the intricacies of wall following behavior, exploring its significance, implementation, and real-world applications within the context of swarm robotics.
Demo Video:
Before diving into the technical details, let's take a moment to watch a demo video showcasing the wall following behavior in action. In the video, you'll witness a swarm robot gracefully maneuvering through its environment, adeptly avoiding obstacles while staying close to the wall. Pay close attention to how the robot adjusts its trajectory in response to changes in the environment, demonstrating the effectiveness of wall following in navigation tasks.
Explanation:
Wall following behavior relies on sensor data to detect the presence of obstacles and maintain a desired distance from them. The process can be broken down into several key steps:
Sensor Data Acquisition: The robot utilizes sensors, such as LIDAR or ultrasonic sensors, to gather information about its surroundings. These sensors provide distance measurements to nearby obstacles, enabling the robot to perceive its environment.
Distance Regulation: Based on the sensor data, the robot calculates its distance from the wall or obstacle. It then adjusts its steering or velocity to ensure that this distance remains constant, thus enabling it to follow the wall without colliding with it.
Trajectory Adjustment: As the robot moves along the wall, it continuously evaluates its position relative to the obstacle. If deviations from the desired path occur due to environmental changes or sensor inaccuracies, the robot makes real-time adjustments to correct its trajectory and maintain the desired distance from the wall.
Obstacle Avoidance: While the primary objective is to follow the wall, the robot must also be capable of avoiding collisions with unexpected obstacles or navigating around corners. To achieve this, it employs obstacle avoidance strategies, such as turning or slowing down, when necessary.
Code:
HTML
def wall_follow(self):
desired_dist = 0.6
ds_data = self.getDistanceData()
threshold = 600
front = ds_data[0]
right = ds_data[1]
left = ds_data[2]
pos, rot = self.getPose()
if self.distance(pos, GOAL) < 0.5 or len(self.memorized_path) == self.max_path_length:
self.stop()
self.isTargetReached = True
self.rememberPose()
else:
self.isTargetReached = False
if self.obstacleDetected() == True:
if front < threshold:
self.drive(MAX_SPEED+5, -MAX_SPEED+5)
self.rememberPose()
elif left < threshold-100:
self.drive(MAX_SPEED+5, -MAX_SPEED+5)
self.rememberPose()
elif left > threshold:
self.drive(-MAX_SPEED+5, MAX_SPEED+5)
self.rememberPose()
else:
self.drive(MAX_SPEED+5, MAX_SPEED+5)
else:
self.drive(MAX_SPEED+5, MAX_SPEED+5)
Conclusion:
In conclusion, wall following behavior is a fundamental capability in swarm robotics, enabling robots to navigate complex environments autonomously. By leveraging sensor data and implementing sophisticated control algorithms, robots can effectively follow walls, circumvent obstacles, and achieve their objectives with precision and efficiency. As we continue to explore the realms of swarm intelligence and robotic autonomy, wall following behavior stands out as a cornerstone in the quest for intelligent robotic systems.
This blog post provides a comprehensive overview of wall following behavior in swarm robotics, covering its implementation, significance, and real-world applications. Whether you're a robotics enthusiast, researcher, or student, understanding wall following behavior sheds light on the capabilities and potential of autonomous robotic systems.

Comments
Post a Comment