| 185 | } |
| 186 | |
| 187 | Eigen::Matrix4d |
| 188 | readMatrixFromFile (std::string filename) |
| 189 | { |
| 190 | Eigen::Matrix4d matrix; |
| 191 | std::string line; |
| 192 | std::ifstream myfile (filename.c_str()); |
| 193 | if (myfile.is_open()) |
| 194 | { |
| 195 | int k = 0; |
| 196 | std::string number; |
| 197 | while (myfile >> number) |
| 198 | { |
| 199 | matrix(int(k/4), int(k%4)) = std::atof(number.c_str()); |
| 200 | k++; |
| 201 | } |
| 202 | myfile.close(); |
| 203 | } |
| 204 | |
| 205 | std::cout << matrix << std::endl; |
| 206 | |
| 207 | return matrix; |
| 208 | } |
| 209 | |
| 210 | /** |
| 211 | * \brief Read the DetectionArray message and use the detections for creating/updating/deleting tracks |
no test coverage detected