00001 /************************************************************************************************** 00002 Software License Agreement (BSD License) 00003 00004 Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt 00005 All rights reserved. 00006 00007 Redistribution and use in source and binary forms, with or without modification, are permitted 00008 provided that the following conditions are met: 00009 00010 *Redistributions of source code must retain the above copyright notice, this list of 00011 conditions and the following disclaimer. 00012 *Redistributions in binary form must reproduce the above copyright notice, this list of 00013 conditions and the following disclaimer in the documentation and/or other materials provided 00014 with the distribution. 00015 *Neither the name of the University of Aveiro nor the names of its contributors may be used to 00016 endorse or promote products derived from this software without specific prior written permission. 00017 00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 00019 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 00020 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 00021 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00023 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00024 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00025 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 ***************************************************************************************************/ 00034 #ifndef _GTK_AUX_H_ 00035 #define _GTK_AUX_H_ 00036 00037 #include <gtk/gtk.h> 00038 #include <glib.h> 00039 #include <types.h> 00040 #include <boost/format.hpp> 00041 #include <ros/package.h> 00042 #include <iostream> 00043 00044 #include <armadillo> 00045 00046 #include <humanoid_control_functions.h> 00047 00048 #define POINTS_FILE_NAME_STRING "demo_user_path_points.txt" 00049 00050 #define RIGHT_ARM_SAVE_STRING "ARM_RIGHT " 00051 #define LEFT_ARM_SAVE_STRING "ARM_LEFT " 00052 #define BOTH_ARMS_SAVE_STRING "ARM_BOTH " 00053 #define LEFT_D_LEG_SAVE_STRING "D_LEG_LEFT " 00054 #define RIGHT_D_LEG_SAVE_STRING "D_LEG_RIGHT " 00055 00063 void UpdateLabels(shared_vars_t*RobotVars); 00064 00072 void UpdateForceBars(shared_vars_t*RobotVars); 00073 00081 void UpdateStatusBar(shared_vars_t*RobotVars); 00082 00089 template <typename Type> 00090 Type AvoidMinusZero(Type value) 00091 { 00092 return (value == (Type)0 ? 0 : value); 00093 } 00094 00095 #endif 00096