This work focuses on systems where mobile robots periodically collect data from (static) wireless sensor network nodes. Suppose we are given approximate locations of the static nodes, and an order with which the robot will visit these nodes. We present solutions to the following problems. (i) From the static node's perspective: given the stochastic nature of the robot's arrival, what is an energy-efficient strategy to send beacon messages? Such a strategy must simultaneously minimize the robot's waiting time and the number of beacon messages. (ii) From the robot's perspective: given the stochastic nature of the wireless link quality, what is an energy-efficient motion strategy to find a good pose (location and orientation) from where the data can be downloaded efficiently? The robot must be able to find such a location quickly but without taking too many measurements so as to conserve the static node's energy. For the first problem, we present an optimal algorithm based on dynamic programming. For the second problem, we present an efficient, data-driven heuristic based on experiments. Finally, we present a system implementation for an indoor data collection application, and validate our results on this system.