RRT Step Tracer¶
Run the RRT Step Tracer MicroSim Fullscreen
You can include this MicroSim on your website using the following iframe:
<iframe src="https://dmccreary.github.io/robot-arm/sims/rrt-step-tracer/main.html"
height="677px" width="100%" scrolling="no"></iframe>
Description¶
Grow a small RRT tree one step at a time: move a random point, see which node is nearest, and watch the new node appear one step toward the point. Then carry out the step by hand in six problems. Used in Chapter 19.
The plane is the configuration space of a two-joint arm, in grid units of 10 degrees. One RRT step, without obstacles, has three parts:
- Find the tree node that is nearest to the random point. The distance is the square root of (dx² + dy²).
- If the distance is larger than the step, the new node is the nearest node + step × (dx, dy) / distance.
- If the point is nearer than one step, the new node is the random point itself.
Lesson Plan¶
Grade level: Middle school and up (age 12+). Time: 10 to 15 minutes.
- Explore. The tree starts with one node at (0, 0) and the random point at (3, 4). Read the distance and the new node. Does the new node land on the random point?
- Grow the tree. Press Add node a few times. Then drag the random point somewhere else, or use the sliders. Which node does the next step start from: the newest one or the nearest one?
- Change the step. Move the step slider. What happens when the random point is nearer than one step?
- Six problems. Choose Six problems in the menu. Work each one out, type the number and press Check. An answer must be within 0.1. You get one attempt at each, and 5 of 6 is mastery.
The problems leave out obstacles. A real RRT also checks that the segment from the nearest node to the new node is free before it keeps the new node.
Specification¶
The learning objective, evidence of mastery and content for this MicroSim are specified in Chapter 19: Optional Advanced Chapter: The Mathematics of Arm Paths.