00001 #include <ati_force_torque/force_torque_sensor_handle_sim.h> 00002 00003 ForceTorqueSensorHandleSim::ForceTorqueSensorHandleSim(ros::NodeHandle& nh, std::string sensor_name, std::string output_frame) : 00004 ForceTorqueSensorSim(nh), hardware_interface::ForceTorqueSensorHandle(sensor_name, output_frame, interface_force_, interface_torque_) 00005 { 00006 transform_frame_ = output_frame; 00007 } 00008 00009 void ForceTorqueSensorHandleSim::updateFTData(const ros::TimerEvent& event) 00010 { 00011 filterFTData(); 00012 interface_force_[0] = threshold_filtered_force.wrench.force.x; 00013 interface_force_[1] = threshold_filtered_force.wrench.force.y; 00014 interface_force_[2] = threshold_filtered_force.wrench.force.z; 00015 00016 interface_torque_[0] = threshold_filtered_force.wrench.torque.x; 00017 interface_torque_[1] = threshold_filtered_force.wrench.torque.y; 00018 interface_torque_[2] = threshold_filtered_force.wrench.torque.z; 00019 }