Following a line from a projector

Hello,

I am working on a project that projects a graph with a projector on table. My GoPiGo needs to be able to follow certain lines that will be highlighted in some color on the projection, lets say W.L.G black line. The problem is, the projector is above the robot, and the robot itself covers the lines it needs to follow, so placing a line follower bellow the robot makes no sense in this case. Is there a possibility to place the line follower infront of the GoPiGo, even tilt it a bit? Will it still work properly? If no what component should I use for this?

I still have yet to buy any of the extra parts so I would like some insight before actually purchasing anything.

Thank you in advance.

3 Likes

I am not aware of anyone testing a forward tilted line follow sensor, so you will be leading - not following!

Does the sensor work, if rather than tilting it, you mounted it looking straight up toward the projector, in a very dark room? If there is enough contrast between the projected light areas and the projected dark line, it may work. Perhaps you will need to customize the line follower driver software to recognize the projected dark line.

3 Likes

The fact is I am working on DexterOS, so I feel limited within the environment that has been provided to me. Since it is from the educational kit I think. Do you think a camera or a RGB sensor would be better choice? I have not found any materials on how the RGB sensor works. Maybe you have some insight in that as well?

3 Likes

Working within the limitations (reality) is always a factor in designing a problem solution.

I always design for success but consider the risks and impact of not succeeding with my initial design. In an educational setting, often a well documented effort which does not succeed at the stated goal will be scored as an educational success. Be sure to plan for post effort documentation time to document the design, the implementation, the result, analysis of the approach, and in the case of not solving the stated goal - alternate approaches for future investigation.

In the DexterOS / GoPiGo OS environment you have several options

  • Graphical Blockly: may allow success with line follower sensor, may not - limited adaptability I think
  • Python: I am not that familiar but choices between Jupyter and Command Line, not sure if other. Here you have full access to the GoPiGo3 sensor APIs and the drivers.

Every sensor has advantages and disadvantages:

  • camera:
    – advantages: Can use OpenCV line recognition (If installed on DexterOS/GoPiGoOS - I believe it is)
    – disadvantage: Seriously Complex to understand for noobies
  • RGB sensor:
    – advantages: ?? if you can choose line color projected, perhaps better discrimination of line vs no line
    – disadvantage: single sensor, so harder to handle line edge and line loss
  • LineFollower:
    – advantages: multiple sensors make recognizing pending line loss much easier
    – disadvantage: designed for limited range sensing - unknown how it performs with projected line

It seems you could test the projected line and line follower output very quickly - not sure about the Blockly output - would start with that and see what the data output consists of and how the linefollower reacts to a projected line.

3 Likes

If you are using a GoPiGo-3, you should upgrade to the new GoPiGo O/S.

Dexter O/S has been depreciated and the new O/S is a much better environment to work with.

Can you project the line-image upward to a translucent surface to create a pattern that the robot can drive on?

3 Likes

I think it would be hard to pull of with the current materials that I have (for the projecting upwards) Any tutorials on how to upgrade the OS?

1 Like

Another question regarding connecting extra sensors to the GoPiGo:

I have tried connecting with an external camera. It was connected directly to the RaspberryPi, but it could not be detected by the robot. My mentor told me that I could try using TCTR5000 Line Tracking Sensor since it is cheaper alternative for the line following.

Do you think it will be compatible with the GoPiGo? Or will it be the same as the camera, and the robot will not be able to detect that it is connected.

1 Like

This is the starting point for downloading/installing/using the GoPiGo OS:

  • Was this an official Raspberry Pi Camera?
    Having a camera attached is fun, but line following with a camera is seriously advanced programming. Probably not worth investing much time to get it working.

That sensor is no good for a projected line - would only detect painted or printed black line on a white surface or paper. With an appropriately crafted cable that sensor could be used with one of the data ports of the GoPiGo3, but there is not a built in sensor driver.

An additional negative about that sensor, is it has only one state output: {“see line”: 1, 0}. While this does work, it is more difficult to program the robot for the “lost line” condition than a multi-element sensor such as this official GoPiGo3 sensor, or this one or this one - BUT these also are for black line on white area such as electrical tape on a white floor or paper.

For a projected from above black line or white line, I would think using two of these sensors would work best with the GoPiGo3. The sensor puts out a voltage that varies by the amount of light it sees. I would mount them close together with a wall between them so each one sees up and to a side.

Both sensors see line: drive straight
Only one sensor sees line: drive in arc slightly toward line (side that sensor sees line)
Neither sensor see line: spin until see line or have spun 360 degrees

Since the sensors output a variable voltage, a more advanced control algorithm could vary the arc to balance the values from the two sensors. This might prevent loss of the line by one sensor resulting in a much smoother/faster line following.

Again, you will need to purchase the connectors to attach to the sensor and to the GoPiGo3 such as these

Another sensor that would work for a projected line - two of these again with a wall between them. These connect via I2C, so it is a little more complicated to write the interface to, but offers some advantages over a variable voltage interface.