How do I work on a track like this?

This track have many gaps and sharp turns. My Arduino cannot go through the sharp turns with gap smoothly with the basic codes. What code should I use in order to complete this track smoothly?

Odometry with extrapolation?

One of many methods, when you lose the line start scanning in an arc, progressing forward a little bit each time you recenter after an unsuccessful arc.

For short gaps, the robot should maintain its current direction of travel until the line is detected again.

You will probably need to set a timer when the gap is first detected. After some predetermined threshold, assume that the robot is lost and start searching for the line again.

Please don't post pictures of code.

Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please edit your posts to remove the pictures of code, and paste it in using code tags.

As described in the "How to get the best out of this forum" post, linked at the head of every forum category.

It's illegible

Not really. Other people's robots manage those gaps just fine, when they implement the approach mentioned in post #4.

Hard to tell, since there's no scale

Need a paint jet on the robot to fill in the gaps. :grin:

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.