force_torque_sensor_node.cpp
Go to the documentation of this file.
00001 /****************************************************************
00002  *
00003  * Copyright 2016 Intelligent Industrial Robotics (IIROB) Group,
00004  * Institute for Anthropomatics and Robotics (IAR) -
00005  * Intelligent Process Control and Robotics (IPR),
00006  * Karlsruhe Institute of Technology
00007  *
00008  * Maintainers: Denis Štogl, email: denis.stogl@kit.edu
00009  *                     Florian Heller
00010  *                     Vanessa Streuer
00011  *
00012  * Date of update: 2014-2016
00013  *
00014  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00015  *
00016  * Copyright (c) 2010
00017  *
00018  * Fraunhofer Institute for Manufacturing Engineering
00019  * and Automation (IPA)
00020  *
00021  * Author: Alexander Bubeck, email:alexander.bubeck@ipa.fhg.de
00022  * Supervised by: Alexander Bubeck, email:alexander.bubeck@ipa.fhg.de
00023  *
00024  * Date of creation: June 2010
00025  *
00026  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00027  *
00028  * Redistribution and use in source and binary forms, with or without
00029  * modification, are permitted provided that the following conditions are met:
00030  *
00031  *     * Redistributions of source code must retain the above copyright
00032  *       notice, this list of conditions and the following disclaimer.
00033  *     * Redistributions in binary form must reproduce the above copyright
00034  *       notice, this list of conditions and the following disclaimer in the
00035  *       documentation and/or other materials provided with the distribution.
00036  *     * Neither the name of the copyright holder nor the names of its
00037  *       contributors may be used to endorse or promote products derived from
00038  *       this software without specific prior written permission.
00039  *
00040  * This program is free software: you can redistribute it and/or modify
00041  * it under the terms of the GNU Lesser General Public License LGPL as
00042  * published by the Free Software Foundation, either version 3 of the
00043  * License, or (at your option) any later version.
00044  *
00045  * This program is distributed in the hope that it will be useful,
00046  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00047  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00048  * GNU Lesser General Public License LGPL for more details.
00049  *
00050  * You should have received a copy of the GNU Lesser General Public
00051  * License LGPL along with this program.
00052  * If not, see <http://www.gnu.org/licenses/>.
00053  *
00054  ****************************************************************/
00055 #include <ati_force_torque/force_torque_sensor_handle.h>
00056 #include <ati_force_torque/force_torque_sensor_handle_sim.h>
00057 #include <ati_force_torque/NodeConfigurationParameters.h>
00058 
00059 class ForceTorqueSensorNode 
00060 {
00061 public:
00062     ForceTorqueSensorNode(ros::NodeHandle &nh):node_params_{nh.getNamespace()+"/Node"}
00063 {
00064     node_params_.fromParamServer();
00065     bool sim = node_params_.sim;
00066     if(sim) new ForceTorqueSensorHandleSim(nh,node_params_.sensor_frame,node_params_.transform_frame);
00067     else{
00068         new ForceTorqueSensorHandle(nh,node_params_.sensor_frame,node_params_.transform_frame);;
00069     }
00070 }
00071 private:
00072     ati_force_torque::NodeConfigurationParameters node_params_;
00073 };
00074 
00075 int main(int argc, char **argv)
00076 {
00077     ros::init(argc, argv, "forcetorque_node");
00078 
00079     ros::AsyncSpinner spinner(4); // Use 4 threads
00080     spinner.start();
00081 
00082     ros::NodeHandle nh("/fts");
00083 
00084     ForceTorqueSensorNode ftn(nh);
00085 
00086     ROS_INFO("ForceTorque Sensor Node running.");
00087 
00088     ros::waitForShutdown();
00089 
00090     return 0;
00091 }
00092 


ati_force_torque
Author(s): Denis Štogl, Alexander Bubeck
autogenerated on Thu Jun 6 2019 21:13:29