00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 namespace pr2_interactive_manipulation {
00031
00032 inline std::vector<double> getSidePosition(std::string arm_name)
00033 {
00034 std::vector<double> sp(7,0.0);
00035 if (arm_name=="right_arm")
00036 {
00037
00038
00039 sp[0] = -2.135; sp[1] = -0.02; sp[2] = -1.64; sp[3] = -2.07; sp[4] = -1.64; sp[5] = -1.680; sp[6] = 1.398;
00040 }
00041 else
00042 {
00043
00044
00045 sp[0] = 2.135; sp[1] = -0.02; sp[2] = 1.64; sp[3] = -2.07; sp[4] = 1.64; sp[5] = -1.680; sp[6] = 1.398;
00046 }
00047 return sp;
00048 }
00049
00050 inline std::vector<double> getFrontPosition(std::string arm_name)
00051 {
00052 std::vector<double> fp(7, 0.0);
00053 if (arm_name=="right_arm")
00054 {
00055 fp[0] = 0.0; fp[1] = 1.203; fp[2] = 0.0; fp[3] = -2.105; fp[4] = -3.13; fp[5] = -1.680; fp[6] = 1.398;
00056 }
00057 else
00058 {
00059 fp[0] = 0.0; fp[1] = 1.203; fp[2] = 0.0; fp[3] = -2.105; fp[4] = 3.13; fp[5] = -1.680; fp[6] = 1.398;
00060 }
00061 return fp;
00062 }
00063
00064 inline std::vector< std::vector<double> > getSideTrajectory(std::string arm_name)
00065 {
00066 std::vector< std::vector<double> > traj;
00067 std::vector<double> p1(7, 0.0);
00068 std::vector<double> p2(7, 0.0);
00069 if (arm_name=="right_arm")
00070 {
00071
00072
00073
00074
00075 p1[0]=-0.968; p1[1]=0.129; p1[2]=-0.554; p1[3]=-1.891; p1[4]=-1.786; p1[5]=-1.127; p1[6]=0.501;
00076 p2[0] = -2.135; p2[1] = -0.02; p2[2] = -1.64; p2[3] = -2.07; p2[4] = -1.64; p2[5] = -1.680; p2[6] = 1.398;
00077 }
00078 else
00079 {
00080
00081
00082
00083
00084 p1[0]=0.968; p1[1]=0.129; p1[2]=0.554; p1[3]=-1.891; p1[4]=1.786; p1[5]=-1.127; p1[6]=0.501;
00085 p2[0] = 2.135; p2[1] = -0.02; p2[2] = 1.64; p2[3] = -2.07; p2[4] = 1.64; p2[5] = -1.680; p2[6] = 1.398;
00086 }
00087 traj.push_back(p1);
00088 traj.push_back(p2);
00089 return traj;
00090 }
00091
00092 inline std::vector< std::vector<double> > getFrontTrajectory(std::string arm_name)
00093 {
00094 std::vector< std::vector<double> > traj;
00095 std::vector<double> p1(7, 0.0);
00096 std::vector<double> p2(7, 0.0);
00097 if (arm_name=="right_arm")
00098 {
00099 p1[0]=-0.968; p1[1]=0.729; p1[2]=-0.554; p1[3]=-1.891; p1[4]=-1.786; p1[5]=-1.127; p1[6]=0.501;
00100 p2[0] = 0.0; p2[1] = 1.203; p2[2] = 0.0; p2[3] = -2.105; p2[4] = -3.13; p2[5] = -1.680; p2[6] = 1.398;
00101 }
00102 else
00103 {
00104 p1[0]=0.968; p1[1]=0.729; p1[2]=0.554; p1[3]=-1.891; p1[4]=1.786; p1[5]=-1.127; p1[6]=0.501;
00105 p2[0] = 0.0; p2[1] = 1.203; p2[2] = 0.0; p2[3] = -2.105; p2[4] = 3.13; p2[5] = -1.680; p2[6] = 1.398;
00106 }
00107 traj.push_back(p1);
00108 traj.push_back(p2);
00109 return traj;
00110 }
00111
00112 inline std::vector<double> getHandoffPosition(std::string arm_name)
00113 {
00114 std::vector<double> sp(7,0.0);
00115 if (arm_name=="right_arm")
00116 {
00117
00118 sp[0] = -2.135; sp[1] = -0.18; sp[2] = -1.732; sp[3] = -1.905; sp[4] = -2.369; sp[5] = -1.680; sp[6] = 1.398;
00119 }
00120 else
00121 {
00122
00123 sp[0] = 2.135; sp[1] = -0.18; sp[2] = 1.732; sp[3] = -1.905; sp[4] = 2.369; sp[5] = -1.680; sp[6] = 1.398;
00124 }
00125 return sp;
00126 }
00127
00128 inline std::vector< std::vector<double> > getHandoffTrajectory(std::string arm_name)
00129 {
00130 std::vector< std::vector<double> > traj;
00131 std::vector<double> p1(7, 0.0);
00132 std::vector<double> p2(7, 0.0);
00133 if (arm_name=="right_arm")
00134 {
00135
00136
00137 p1[0]=-0.968; p1[1]=0.129; p1[2]=-0.554; p1[3]=-1.891; p1[4]=-1.786; p1[5]=-1.127; p1[6]=0.501;
00138 p2[0]=-2.135; p2[1]=-0.18; p2[2]=-1.732; p2[3]=-1.905; p2[4]=-2.369; p2[5]=-1.680; p2[6]=1.398;
00139 }
00140 else
00141 {
00142
00143
00144 p1[0]=0.968; p1[1]=0.129; p1[2]=0.554; p1[3]=-1.891; p1[4]=1.786; p1[5]=-1.127; p1[6]=0.501;
00145 p2[0]=2.135; p2[1]=-0.18; p2[2]=1.732; p2[3]=-1.905; p2[4]=2.369; p2[5]=-1.680; p2[6]=1.398;
00146 }
00147 traj.push_back(p1);
00148 traj.push_back(p2);
00149 return traj;
00150 }
00151
00152 inline std::vector<double> getSideHandoffPosition(std::string arm_name)
00153 {
00154 std::vector<double> sp(7,0.0);
00155 if (arm_name=="right_arm")
00156 {
00157 sp[0] = -2.099; sp[1] = 0.041; sp[2] = -1.488; sp[3] = -0.694; sp[4] = -1.693; sp[5] = -1.596; sp[6] = 0.128;
00158 }
00159 else
00160 {
00161 sp[0] = 2.099; sp[1] = -0.041; sp[2] = 1.488; sp[3] = -0.694; sp[4] = 1.693; sp[5] = -1.596; sp[6] = 0.128;
00162 }
00163 return sp;
00164 }
00165
00166 inline std::vector< std::vector<double> > getSideHandoffTrajectory(std::string arm_name)
00167 {
00168 std::vector< std::vector<double> > traj;
00169 std::vector<double> p1(7, 0.0);
00170 std::vector<double> p2(7, 0.0);
00171 if (arm_name=="right_arm")
00172 {
00173 p1[0]=-0.968; p1[1]=0.129; p1[2]=-0.554; p1[3]=-1.891; p1[4]=-1.786; p1[5]=-1.127; p1[6]=0.501;
00174 p2[0] = -2.099; p2[1] = 0.041; p2[2] = -1.488; p2[3] = -0.694; p2[4] = -1.693; p2[5] = -1.596; p2[6] = 0.128;
00175 }
00176 else
00177 {
00178 p1[0]=0.968; p1[1]=0.129; p1[2]=0.554; p1[3]=-1.891; p1[4]=1.786; p1[5]=-1.127; p1[6]=0.501;
00179 p2[0] = 2.099; p2[1] = -0.041; p2[2] = 1.488; p2[3] = -0.694; p2[4] = 1.693; p2[5] = -1.596; p2[6] = 0.128;
00180 }
00181 traj.push_back(p1);
00182 traj.push_back(p2);
00183 return traj;
00184 }
00185
00186 }