wait for transform without interrupting publishing setpoints
| 194 | |
| 195 | // wait for transform without interrupting publishing setpoints |
| 196 | inline bool waitTransform(const string& target, const string& source, |
| 197 | const ros::Time& stamp, const ros::Duration& timeout) // editorconfig-checker-disable-line |
| 198 | { |
| 199 | ros::Rate r(100); |
| 200 | auto start = ros::Time::now(); |
| 201 | while (ros::ok()) { |
| 202 | if (ros::Time::now() - start > timeout) return false; |
| 203 | if (tf_buffer.canTransform(target, source, stamp)) return true; |
| 204 | ros::spinOnce(); |
| 205 | r.sleep(); |
| 206 | } |
| 207 | return false; |
| 208 | } |
| 209 | |
| 210 | void publishTerrain(const double distance, const ros::Time& stamp) |
| 211 | { |
no outgoing calls
no test coverage detected