This repository has been archived by the owner on Aug 1, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure to properly initialize the CameraInfo structure.
sensor_msgs::msg::CameraInfo is one of the common_interfaces generated messages. As such, it has a default constructor that is empty and does no initialization. This is important to note, because it means that constructs such as: class Foo { protected: sensor_msgs::msg::CameraInfo cam_info_{}; }; Will *not* initialize all member variables of CameraInfo objects to their default. Thus, the PinholeCameraModel tests were failing randomly because they were using random stack data for their cam_info_ state. Rectify this in PinholeCameraModel by explicitly filling in all zeros for the CameraInfo objects. Signed-off-by: Chris Lalancette <clalancette@osrfoundation.org>
- Loading branch information