MCPcopy Create free account
hub / github.com/CopterExpress/clover / waitTransform

Function waitTransform

clover/src/simple_offboard.cpp:196–208  ·  view source on GitHub ↗

wait for transform without interrupting publishing setpoints

Source from the content-addressed store, hash-verified

194
195// wait for transform without interrupting publishing setpoints
196inline 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
210void publishTerrain(const double distance, const ros::Time& stamp)
211{

Callers 4

publishTerrainFunction · 0.85
getTelemetryFunction · 0.85
globalToLocalFunction · 0.85
serveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected