<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bespokerobotsociety.org/index.php?action=history&amp;feed=atom&amp;title=Behavior%3AWall_Following</id>
	<title>Behavior:Wall Following - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bespokerobotsociety.org/index.php?action=history&amp;feed=atom&amp;title=Behavior%3AWall_Following"/>
	<link rel="alternate" type="text/html" href="https://wiki.bespokerobotsociety.org/index.php?title=Behavior:Wall_Following&amp;action=history"/>
	<updated>2026-04-25T10:14:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.bespokerobotsociety.org/index.php?title=Behavior:Wall_Following&amp;diff=50&amp;oldid=prev</id>
		<title>John: Claude edited based on my notes, prompt, and SimpleBot code repository</title>
		<link rel="alternate" type="text/html" href="https://wiki.bespokerobotsociety.org/index.php?title=Behavior:Wall_Following&amp;diff=50&amp;oldid=prev"/>
		<updated>2025-10-11T16:48:27Z</updated>

		<summary type="html">&lt;p&gt;Claude edited based on my notes, prompt, and SimpleBot code repository&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Behavior&lt;br /&gt;
| name = Wall Following&lt;br /&gt;
| requires = [[Capability:Time-of-Flight Sensing]] or [[Capability:Ultrasonic Sensing]], [[Capability:Differential Drive]]&lt;br /&gt;
| enables = [[Activity:Maze Solving]]&lt;br /&gt;
| difficulty = Beginner&lt;br /&gt;
| status = &amp;#039;&amp;#039;&amp;#039;Stub&amp;#039;&amp;#039;&amp;#039; - Algorithm not yet implemented&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Wall Following&amp;#039;&amp;#039;&amp;#039; is a behavior (algorithm) that maintains a constant distance from a wall while moving parallel to it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This is a stub page.&amp;#039;&amp;#039;&amp;#039; This behavior is not yet implemented in any BRS robot. This page exists to:&lt;br /&gt;
* Document the algorithmic concept&lt;br /&gt;
* Invite community members to implement it&lt;br /&gt;
* Provide a starting point for algorithm design&lt;br /&gt;
&lt;br /&gt;
== Required Capabilities ==&lt;br /&gt;
&lt;br /&gt;
This behavior requires:&lt;br /&gt;
&lt;br /&gt;
* [[Capability:Time-of-Flight Sensing]]&lt;br /&gt;
* [[Capability:Ultrasonic Sensing]]&lt;br /&gt;
* [[Capability:Differential Drive]]&lt;br /&gt;
&lt;br /&gt;
== Enables Activities ==&lt;br /&gt;
&lt;br /&gt;
Implementing this behavior enables:&lt;br /&gt;
&lt;br /&gt;
* [[Activity:Maze Solving]]&lt;br /&gt;
&lt;br /&gt;
== Algorithm Outline ==&lt;br /&gt;
&lt;br /&gt;
Wall following uses distance sensing and proportional control:&lt;br /&gt;
&lt;br /&gt;
# Measure distance to wall&lt;br /&gt;
# If distance &amp;lt; target: turn away from wall&lt;br /&gt;
# If distance &amp;gt; target: turn toward wall&lt;br /&gt;
# Drive forward&lt;br /&gt;
&lt;br /&gt;
For maze solving, consistently follow left or right wall until exit is reached.&lt;br /&gt;
&lt;br /&gt;
== Pseudocode ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Wall Following&lt;br /&gt;
TARGET_DISTANCE = 20  # cm&lt;br /&gt;
&lt;br /&gt;
while True:&lt;br /&gt;
    distance_to_wall = read_distance_sensor()&lt;br /&gt;
    error = distance_to_wall - TARGET_DISTANCE&lt;br /&gt;
&lt;br /&gt;
    turn_adjustment = error * gain  # Proportional control&lt;br /&gt;
&lt;br /&gt;
    left_speed = BASE_SPEED + turn_adjustment&lt;br /&gt;
    right_speed = BASE_SPEED - turn_adjustment&lt;br /&gt;
&lt;br /&gt;
    set_motors(left_speed, right_speed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Challenges ==&lt;br /&gt;
&lt;br /&gt;
* **Corners**: Detecting and handling inside/outside corners&lt;br /&gt;
* **Gaps**: What to do when wall disappears (doorways, openings)&lt;br /&gt;
* **Obstacles**: Handling objects protruding from wall&lt;br /&gt;
* **Sensor placement**: Angled sensors vs perpendicular sensors&lt;br /&gt;
&lt;br /&gt;
== Contributing ==&lt;br /&gt;
&lt;br /&gt;
Want to implement this behavior? Here&amp;#039;s how:&lt;br /&gt;
&lt;br /&gt;
# Study the algorithm outline above&lt;br /&gt;
# Implement in your language of choice (MicroPython, C++, Arduino)&lt;br /&gt;
# Test on a robot with the required capabilities&lt;br /&gt;
# Create an Implementation page (e.g., &amp;lt;code&amp;gt;[[YourRobot:Wall Following Implementation]]&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Update this page with algorithm refinements&lt;br /&gt;
# Share working code on GitHub&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Behaviors]] - All behaviors&lt;br /&gt;
* [[Capabilities]] - Hardware required&lt;br /&gt;
* [[Activities]] - What this enables&lt;br /&gt;
* [[Robotics Ontology]] - How behaviors fit into BRS knowledge structure&lt;br /&gt;
&lt;br /&gt;
[[Category:Behavior]]&lt;br /&gt;
[[Category:Beginner Behavior]]&lt;br /&gt;
[[Category:Stub]]&lt;/div&gt;</summary>
		<author><name>John</name></author>
	</entry>
</feed>