Troubleshooting and Discussion

Troubleshooting:
  • If the robot crashes into the object:

    Make sure the TCP (Tool Center Point) of the robot is activated when using vision. This ensures the robot accounts for the height and geometry of the tool it’s using.

  • If the vision does not work properly (e.g., picking the wrong object or not detecting), check the filter settings and adjust them to see if this improves the results.




Discussion:
  • When multiple objects are stacked or arrive close together, the current code may have limitations. The delay between the IR sensor detecting an object and the conveyor stopping can sometimes let extra objects pass.

  • One improvement would be to first check if an object is detected; if not, run the conveyor.

  • Another approach is to use vision-based detection instead of relying solely on the IR sensor: if the vision detects an object in the workspace, the robot picks it; if the workspace is empty, the conveyor runs.