MCPcopy Create free account
hub / github.com/TJU-Aerial-Robotics/YOPO / imu_callback

Method imu_callback

Controller/src/so3_control/src/NetworkControl.cpp:302–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302void NetworkControl::imu_callback(const sensor_msgs::Imu &imu)
303{
304 Eigen::Vector3d acc(imu.linear_acceleration.x,
305 imu.linear_acceleration.y,
306 imu.linear_acceleration.z);
307 if (is_simulation_)
308 {
309 cur_acc_ = acc;
310 }
311 else
312 {
313 Eigen::Vector3d acc_world = cur_att_ * acc;
314 acc_world(2) -= 9.8;
315 cur_acc_ = acc_world;
316 }
317
318 // so3_controller_.setAcc(acc_world);
319}
320
321void NetworkControl::timerCallback(const ros::TimerEvent &)
322{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected