MCPcopy Create free account
hub / github.com/brytsknguyen/slict / ImuHandler

Method ImuHandler

src/SensorSync.cpp:262–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260 }
261
262 void ImuHandler(const sensor_msgs::Imu::ConstPtr &msg)
263 {
264 imu_buf_mtx.lock();
265
266 if (imu_scale != 1.0)
267 {
268 sensor_msgs::Imu::Ptr scaled_imu(new sensor_msgs::Imu());
269
270 *scaled_imu = *msg;
271 scaled_imu->linear_acceleration.x *= imu_scale;
272 scaled_imu->linear_acceleration.y *= imu_scale;
273 scaled_imu->linear_acceleration.z *= imu_scale;
274
275 imu_buf.push_back(scaled_imu);
276 }
277 else
278 imu_buf.push_back(msg);
279
280 imu_buf_mtx.unlock();
281 }
282
283 void SyncLidar()
284 {

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected