In swarm robotics systems, the constituent robots are typically equipped with simple onboard sensors of limited quality and range. In this paper, we propose to use local communication to enable sharing of sensory information between neighboring robots to overcome the limitations of onboard sensors. Shared information is used to compute readings for virtual, collective sensors that, to a control program, are indistinguishable from a robot’s onboard sensors. We evaluate two implementations of collective sensors: one that relies on sharing of immediate sensory information within a local frame of reference, and another that relies on sharing of accumulated sensory information within a global frame of reference. We compare performance of swarms using collective sensors with: (i) swarms in which robots only use their onboard sensors, and (ii) swarms in which the robots have idealized sensors. Our experimental results show that collective sensors significantly improve the swarm’s performance by effectively extending the capabilities of the individual robots.