Our work addresses issues related to the cohabitation of service robots and people in unstructured environments. We propose new planning techniques to empower robot means-end reasoning with the capability of taking into account human intentions and preferences. We also address the problem of human activity recognition in instrumented environments. We employ a constraint-based approach to realize a continuous inference process to attach a meaning to sensor traces as detected by sensors distributed in the environment.