calc.py
Go to the documentation of this file.
00001 #
00002 #
00003 # Copyright (c) 2010, Georgia Tech Research Corporation
00004 # All rights reserved.
00005 # 
00006 # Redistribution and use in source and binary forms, with or without
00007 # modification, are permitted provided that the following conditions are met:
00008 #     * Redistributions of source code must retain the above copyright
00009 #       notice, this list of conditions and the following disclaimer.
00010 #     * Redistributions in binary form must reproduce the above copyright
00011 #       notice, this list of conditions and the following disclaimer in the
00012 #       documentation and/or other materials provided with the distribution.
00013 #     * Neither the name of the Georgia Tech Research Corporation nor the
00014 #       names of its contributors may be used to endorse or promote products
00015 #       derived from this software without specific prior written permission.
00016 # 
00017 # THIS SOFTWARE IS PROVIDED BY GEORGIA TECH RESEARCH CORPORATION ''AS IS'' AND
00018 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00019 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00020 # DISCLAIMED. IN NO EVENT SHALL GEORGIA TECH BE LIABLE FOR ANY DIRECT, INDIRECT,
00021 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00022 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
00023 # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00024 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
00025 # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00026 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027 #
00028 
00029 # \author Advait Jain (Healthcare Robotics Lab, Georgia Tech.)
00030 
00031 import numpy as np
00032 import hrl_lib.util as ut
00033 
00034 #---- X axis -----
00035 #p = ut.load_pickle('eq_pos_2010May01_213254.pkl')
00036 #d = ut.load_pickle('stiffness_2010May01_213323.pkl')
00037 #n = 0
00038 
00039 
00040 #--- Y axis ----
00041 #p = ut.load_pickle('eq_pos_2010May01_213832.pkl')
00042 #d = ut.load_pickle('stiffness_2010May01_213907.pkl')
00043 #n = 1
00044 
00045 #--- Z axis
00046 p = ut.load_pickle('eq_pos_2010May01_214434.pkl')
00047 d = ut.load_pickle('stiffness_2010May01_214512.pkl')
00048 n = 2
00049 
00050 pos_list = d['pos_list']
00051 force_list = d['force_list']
00052 
00053 
00054 stiff_list = []
00055 for pos,force in zip(pos_list,force_list):
00056     dx = pos[n,0]-p[n,0]
00057     f = force[n,0]
00058     print 'force:',f
00059     print 'dx:',dx
00060     stiff_list.append(f/dx)
00061 
00062 print stiff_list
00063 
00064 


2010_icra_epc_pull
Author(s): Advait Jain, Charles C. Kemp (Healthcare Robotics Lab, Georgia Tech)
autogenerated on Wed Nov 27 2013 12:14:43