I think it's okay to have a new thread since a specific application is mentioned and is in a appropriate sub thread.
The first thing is to nail down what your robot needs to know to complete the given task. Next what sensors tell you this information
consistently. Third which of these outputs the simpler, faster, and easier to work with signal and corresponding data type. Fourth what is the sensor going to touch physically and where will it be. Fifth where will you get it and how much will is cost.
For this you want the robot to lift a tote to a given height once it is in the robot. So #1 you need to know if the tote is in the robot. But you really need to know if the to is in the correct position to be successfully lifted. That is to say that you don't care how far into your robot is is the important part is whether or not it is all the way into the robot. Rangefinders, and switches both give you this information but rangefinders will give you more than you
need and are (albeit very slightly) more complex to program and wire.
A switch of some kind will usually be cheaper than a good rangefinder and will operate more consistently. Industrial grade limit switches are also made to work forever +/- a day or two and will give you very detailed operating parameters and dimensions in there datasheets. Another point about industrial switches is they tend to be more robust or like
this switch which has a probe that bends after the switch is thrown so the part that does the switching is protected form shock or over travel. Cost wise it's $27 which isn't very bad but when you consider that company gives you a $30 voucher in the kit every year...
So that was the process I would go through to pick a sensor for that application. Unless that is you meant the position control on the lift.