Modelling Communication with Robots and Virtual Humans