00001 00012 #ifndef ARM_SAFETY_H_ 00013 #define ARM_SAFETY_H_ 00014 00015 #include <ros/ros.h> 00016 #include <time.h> 00017 #include <stdio.h> 00018 #include <sensor_msgs/JointState.h> 00019 00020 #define J1_THRESHOLD 7.0 00021 #define J2_THRESHOLD 25.5 00022 #define J3_THRESHOLD 14.0 00023 #define J4_THRESHOLD 5.0 00024 #define J5_THRESHOLD 5.0 00025 #define J6_THRESHOLD 3.5 00026 #define F1_THRESHOLD 1.5 00027 #define F2_THRESHOLD 1.5 00028 #define F3_THRESHOLD 1.5 00029 00037 class arm_safety 00038 { 00039 public: 00043 arm_safety(); 00044 00045 private: 00051 void joints_cback(const sensor_msgs::JointState::ConstPtr& scan); 00052 00053 ros::NodeHandle node; 00055 ros::Subscriber joint_sub; 00057 bool enable_audible_warnings; 00059 }; 00060 00068 int main(int argc, char **argv); 00069 00070 #endif