From 524263ecc73b0fb6489e095100117b68ca22c45d Mon Sep 17 00:00:00 2001 From: vivek Date: Mon, 14 Nov 2016 17:33:26 -0500 Subject: [PATCH] cleanup --- include/roscontroller.h~ | 103 --------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 include/roscontroller.h~ diff --git a/include/roscontroller.h~ b/include/roscontroller.h~ deleted file mode 100644 index 1f01482..0000000 --- a/include/roscontroller.h~ +++ /dev/null @@ -1,103 +0,0 @@ -#pragma once -#include "ros/ros.h" -#include "sensor_msgs/NavSatFix.h" -#include "mavros_msgs/GlobalPositionTarget.h" -#include "mavros_msgs/CommandCode.h" -#include "mavros_msgs/CommandInt.h" -#include "mavros_msgs/State.h" -#include "mavros_msgs/BatteryStatus.h" -#include "mavros_msgs/Mavlink.h" -#include "sensor_msgs/NavSatStatus.h" -#include -#include -#include "buzzuav_closures.h" -#include "buzz_utility.h" -#include "uav_utility.h" -#include -#include -#include -#include -#include -#include - -using namespace std; - -namespace rosbzz_node{ - - -class roscontroller{ - -public: - roscontroller(); - ~roscontroller(); - //void RosControllerInit(); - void RosControllerRun(); - /* The bytecode filename */ - char* bcfname; // = (char*)"/src/rosbuzz/src/out.bo"; //argv[1]; - /* The debugging information file name */ - char* dbgfname; //= (char*)"/src/rosbuzz/src/out.bdbg"; //argv[2]; -private: - - double cur_pos[3]; - uint64_t payload; - std::map< int, buzz_utility::Pos_struct> neighbours_pos_map; - int timer_step=0; - int robot_id=0; - int oldcmdID=0; - int rc_cmd; - std::string bzzfile_name, fcclient_name, rcservice_name; //, rcclient; - bool rcclient; - ros::ServiceClient mav_client; - ros::Publisher payload_pub; - ros::ServiceServer service; - ros::Subscriber current_position_sub; - ros::Subscriber battery_sub; - ros::Subscriber payload_sub; - /*Create node Handler*/ - ros::NodeHandle n_c; - /*Commands for flight controller*/ - mavros_msgs::CommandInt cmd_srv; - - - void Initialize_pub_sub(); - - /*Obtain data from ros parameter server*/ - void Rosparameters_get(); - - void Compile_bzz(); - - /*Prepare messages and publish*/ - inline void prepare_msg_and_publish(); - - - /*Refresh neighbours Position for every ten step*/ - inline void maintain_pos(int tim_step); - - /*Maintain neighbours position*/ - inline void neighbours_pos_maintain(int id, buzz_utility::Pos_struct pos_arr ); - - /*Set the current position of the robot callback*/ - inline void set_cur_pos(double latitude, - double longitude, - double altitude); - /*convert from catresian to spherical coordinate system callback */ - inline double* cvt_spherical_coordinates(double neighbours_pos_payload []); - - /*battery status callback*/ - inline void battery(const mavros_msgs::BatteryStatus::ConstPtr& msg); - - /*current position callback*/ - inline void current_pos(const sensor_msgs::NavSatFix::ConstPtr& msg); - - /*payload callback callback*/ - inline void payload_obt(const mavros_msgs::Mavlink::ConstPtr& msg); - - /* RC commands service */ - inline bool rc_callback(mavros_msgs::CommandInt::Request &req, - mavros_msgs::CommandInt::Response &res); - - - -}; - -}