loading

Stayout Line

 Download the Stayout Line robofile.

  1. This demo uses a black line on the carpet to prevent Roomba from entering into a place it should not be. This is not unlike the line following demo but instead of following a line it avoids contact with the line and looks at the slope of the line to determine the quickest direction to turn away from the line. This works best with a completely mobile system with the Netbook, Camera, and base all attached ontop of the Roomba as it requires free movement. This also works best when good lighting is available as less motion blur will be caused and the line will appear less blurry.

    As this robofile picks up objects that are darker than the surrounding image area it may be fooled by darker patterns on the carpet. As the slope of those lines will also be unknown the robot will exhibit a random type of movement on textured carpets (good fun to watch!).

  2. First double click on the Roomba module in the processing pipeline and change the serial COM port to the one you are using. Note that if you happen to have a serial port on your Netbook then the COM port will most likely be from COM1 to COM4. If you are using a USB to serial converter then it can be a much higher number. RoboRealm will only display those COM ports that are active within the system so the COM port selection should be limited to only a few selections. If you are not sure on which COM port is being used start with the highest one and test while moving to lower ones.

    If you have already configured the Roomba in a previous robofile then the COM port should already be configured for your robot assuming the "Remember as default" checkbox in the Roomba GUI interface is set.

  3. If the camera view is not already present press the Camera button in the main RoboRealm interface to show you the USB webcam image. If you have multiple cameras installed or other imaging devices you may need to press the Options button->Video Tab and select the camera from the dropdown list that shows all the imaging devices installed in the system.

  4. Once you get the COM port and camera invoked you should see the image from the USB Webcam in the main RoboRealm GUI but it should be a black image. If you move the robot closer to the black line you will see it appear as while pixels. That means that everything is working ok and you can now press the Running button which will trigger the robot to start moving.

  5. The behavior is created by looking for large edges in the image (it sees the entire line as a single edge) and then filtering out those objects that are probably not lines, i.e. too small, not thin enough, etc. Once this is accomplished it then determines what angle or slope the line is. If the line appears slanted or not.
    Turn Left Turn Right

  6. All of this logic is performed in the VBScript module which decides how to populate the left and right motor variables in response to where the line is and how it is angled. Note that this information comes from the Wall Finder detection module.


  7. Once the motor variables are set the Roomba module then grabs these value and passes it to the Roomba robot to complete the cycle.