Developing a robot comes in many stages, but I find the most common one seems to be trial & error. Let's start by looking at the simple problem of attaching a sprocket to a shaft to transmit power via chain, like on a bicycle.
Now this may initially seem like a a fairly easy problem. You could use a keyway or a set screw on the sprocket to attach it to the shaft. Maybe you could use something fancy such as a sprocket with a Fairloc integrated fastener. Maybe press-fit would be suitable for your torque transmission requirements.
What if the shaft you wanted to use was 3 millimeters in diameter? What if the shaft was stainless steel and the sprocket was made out of glass reinforced nylon (Nylatron)? Now it's time to start thinking about adhesives.
CA Glue aka Superglue aka Cyanoacrylate
CA Glue is generally good for plastics, ok for metals and bad for glass. It tends to melt plastic together, which can often be good as it will melt to pieces of plastic into one piece of plastic. I tried using this but it did not work for attaching the sprocket, probably due to the Nylatron being a glass composite and the high shear forces.
Store Brand Epoxy
Epoxy generally works best on porous materials and is also used to make carbon fiber. This didn't work because the shaft was too smooth.
Loctite® 242® Threadlocker aka Blue Loctite
Blue Loctite is generally used to keep screws from coming loose where you think you might want to take them out again. This would be great to put on a set screw to keep it from coming loose. Unfortunately it is not going to work for this project.
Loctite® 272® Threadlocker aka Red Loctite
Red Loctite is similar to blue Loctite except that is is used on screws that you do not ever plan on removing. One trick though for removing a screw that red Loctite was used on is to heat it with a soldering iron or heat gun.
Loctite® 680 High strength retaining compound aka Green Loctite
Green loctite is used as a retaining compound which makes it ideal for connecting gear, sprockets and bearings to shafts. There is also a primer that is suggested for stainless steel. Call the manufacturer or at least visit their website before buying this, as your problem may be slightly different then mine. Also note that there are hundreds of Loctite products.
After treating the shaft, adhering the parts and allowing them to dry, the results were tested. The results of testing showed that the green Loctite worked the best, however it failed at approximately 90% of desired torque transfer.
The solution to this adventure was to drill a 1mm hole in the 3 mm shaft and then glue it with epoxy as shown below, which unexpectedly worked.