In this paper, we study the problem of data collection for monitoring traffic condition with compressed sensing (CS) in vehicular ad-hoc networks (VANETs). Unlike the conventional approaches, which require uniform sampling of the velocities of the vehicles, we propose a scheme that combines in-network data aggregation and compressed sensing technique based on random walk for data gathering in VANETs to reduce the communication cost as much as possible. The key point is that the aggregation information about road segments are carried and forwarded by mobile vehicles so that "random walk" of the measurement is difficult. In this paper, from the perspectives of CS technique based on random walk, we propose an integral data collection method based on compressed sensing, which includes an in-network data aggregation protocol, the representation basis construction, the measurement matrix construction, and a data transmission protocol based on CS. We conducted an extensive experimental study to demonstrate the effectiveness of the proposed scheme. Simulation results show that our proposed scheme can significantly reduce communication cost, indicating that our scheme can be a more practical method for data collection of monitoring traffic condition in VANETs.