Catn-groups are a type of higher dimensional categorical structure; they were introduced in 1982 as algebraic model of n-types. A connection between these structures and homological algebra was established at that time. Recent developments link Catn-groups with homotopical algebra. After recalling this background, we will introduce a (co)homology theory of crossed modules with coefficients in a pi_1-module, and we will describe its main properties.