Why does RaycastSensor not work?

I’ve spent quite a bit of time trying to set up the raycast sensor in different cases, but haven’t gotten it to send a signal once.

Why does the raycast sensor not fire in this following scenario?

  • Robot places products onto the output conveyor, attached to the frame Sensor
  • The conveyor includes a RaycastSensor with these settings.
  • Sensor frame is at the same place as the conveyor Start, but rotated so the ray would point in the direction of the conveyor.
  • In simulation, the ray goes straight through the products, but none of the signals fire.

Tried:

  • Changing DetectionContainer and TestParent
  • Attaching sensor to another frame on the path between start and end

Goal was to measure the distance from the conveyor start until the edge of the product.

What happens if you put DetectionContainer into Null? It crosses my mind that perhaps the product component is in some other container (e.g. the robot’s grasp container) at the moment when the sensor should measure it.

I actually tried this many times, switching it between Null and Path and didn’t see any difference.

…until now. Just opened the layout today and it’s working fine - didn’t really change anything. I guess sometimes when something just doesn’t work, the solution is to close and reopen Visual Components. :man_shrugging:

DetectionContainer is Null, yes. Thanks for the comment though!