Robot Operating System (ROS) is widely used in academia and industry, and importantly is leveraged in safety-critical robotic systems. The quality of ROS software can affect the safety and security properties of robotics systems; therefore, reliability and quality are imperative to guarantee. Source code static analysis is a key approach to formally perform software verification. We address two concerns in this paper: (1) conducting a systematic literature review study to provide a complete picture of the existing methods that analyze different aspects of ROS software, (2) performing empirical study to evaluate software properties that can influence the functionality of ROS. We leverage PMD1, an off-the-shelf static analysis tool, to conduct our empirical study over a set of ROS repositories implemented using Java. The survey analysis shows a significant shortcoming in the body of research by the lack of tailored analysis mechanisms for assessing ROS2 code and reveals that the majority of research efforts are centered around ROS1. Our empirical study shows that the Java code of ROS2 does not suffer from serious issues and the majority of the detected alerts are code style issues.