analogue_to_effort.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2013, Shadow Robot Company, All rights reserved.
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 3.0 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library.
00016  */
00017 
00024 #include "sr_ronex_transmissions/mapping/general_io/analogue_to_effort.hpp"
00025 #include <ros_ethercat_model/robot_state.hpp>
00026 #include <boost/lexical_cast.hpp>
00027 
00028 namespace ronex
00029 {
00030 namespace mapping
00031 {
00032 namespace general_io
00033 {
00034 AnalogueToEffort::AnalogueToEffort(TiXmlElement* mapping_el, ros_ethercat_model::RobotState* robot)
00035   : AnalogueToPosition(mapping_el, robot)
00036 {
00037 }
00038 
00039 void AnalogueToEffort::propagateFromRonex(ros_ethercat_model::JointState *js)
00040 {
00041   if ( !is_initialized_ )
00042     return;
00043 
00044   if ( check_pin_in_bound_() )
00045   {
00046     js->effort_ = compute_scaled_data_();
00047   }
00048 }
00049 }  // namespace general_io
00050 }  // namespace mapping
00051 }  // namespace ronex
00052 /* For the emacs weenies in the crowd.
00053    Local Variables:
00054    c-basic-offset: 2
00055    End:
00056 */


sr_ronex_transmissions
Author(s): Ugo Cupcic, Toni Oliver, Mark Pitchless
autogenerated on Thu Jun 6 2019 21:21:55