Machinery and robot systems in dynamic shop floor environments using novel embedded cognitive functions