From a0429d6f027f28c85d144c293c6ffa37fb828081 Mon Sep 17 00:00:00 2001 From: Steve Tonneau <stonneau@axle.laas.fr> Date: Thu, 11 May 2017 09:38:28 +0200 Subject: [PATCH] scaling scenario --- data/meshes/siggraph_asia/scale.stl | Bin 0 -> 13284 bytes data/srdf/siggraph_asia/scale.srdf | 3 + data/urdf/siggraph_asia/scale.urdf | 19 + script/scenarios/demos/siggraph_asia/log.txt | 346 ++++++++++++++++++ .../demos/siggraph_asia/scale_hrp2_interp.py | 18 +- 5 files changed, 377 insertions(+), 9 deletions(-) create mode 100644 data/meshes/siggraph_asia/scale.stl create mode 100644 data/srdf/siggraph_asia/scale.srdf create mode 100644 data/urdf/siggraph_asia/scale.urdf create mode 100644 script/scenarios/demos/siggraph_asia/log.txt diff --git a/data/meshes/siggraph_asia/scale.stl b/data/meshes/siggraph_asia/scale.stl new file mode 100644 index 0000000000000000000000000000000000000000..d428086279d69bb1db5c2ab57f0cfb4fb7fd2c35 GIT binary patch literal 13284 zcmb7~f2f{y8OC2hY=77+lspE(u|LG5S!}5_^t`JWH44%OVfsgNKaNPACQD`gpgpZX zBAH}J+ZtwuF_^N+T(EHGS^beYrde4~nnDbW#u%8PknMD?`#zuV_j;al-WNK5Y!}aS zf9~tL@8|peU^{EK-?eqy-CH(KPH)>fGx>=-w|r&umTfCmUVYs)lUIKAo{f_q{=ne> z`dN0K%9|GGrW+=QtDf1>?t5w15dFgPouQ`>-QP-6+k`s(=Z_Tv4WUjDSuIvo>Lm}f zs+=w!kxWS-&=CDpBAeE;dtdj%BZ%VelcVv@-f$$L%J<e!mD7`o$(<OzE2_xuG~2Do zyvh@D-HD{A(j5|x-EMhmo`fy<uA+aOlJ`8(ObrH;YX*ahu0{WHZf<t@vA@ng;mI}9 zsvZpH=5_?Z9Veu@UJ1_cLf_-Z=X;?CgXey+KpdA2i}^qD#QPnz)6z-o*>l+{QS{Xv zCl<8L0pWLia_=OMX86)mpF1eU9pyz^s^ZZMw@iQAiMWG@?d^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omxq4tI~TXo)Yfwaq3qHS=u88r zD)o{FT7=Wo)^i1+gd}kqBD~^U;qHA$62;voN8_EnaUuy-Y=P^Gcjen9mD3RQ{mQGz lE`sY2HJMkD1cJRWK~hwy7YU{5<Q_qkJM`^OuIq!r{{VWWxS#+4 literal 0 HcmV?d00001 diff --git a/data/srdf/siggraph_asia/scale.srdf b/data/srdf/siggraph_asia/scale.srdf new file mode 100644 index 0000000..114223f --- /dev/null +++ b/data/srdf/siggraph_asia/scale.srdf @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<robot name="scale"> +</robot> diff --git a/data/urdf/siggraph_asia/scale.urdf b/data/urdf/siggraph_asia/scale.urdf new file mode 100644 index 0000000..25c381e --- /dev/null +++ b/data/urdf/siggraph_asia/scale.urdf @@ -0,0 +1,19 @@ +<robot name="scale"> + <link name="base_link"> + <visual> + <origin xyz="0 0 0" rpy="0 0 0" /> + <geometry> + <mesh filename="package://hpp-rbprm-corba/meshes/scale.stl"/> + </geometry> + <material name="white"> + <color rgba="1 1 1 1"/> + </material> + </visual> + <collision> + <origin xyz="0 0 0" rpy="0 0 0" /> + <geometry> + <mesh filename="package://hpp-rbprm-corba/meshes/scale.stl"/> + </geometry> + </collision> + </link> +</robot> diff --git a/script/scenarios/demos/siggraph_asia/log.txt b/script/scenarios/demos/siggraph_asia/log.txt new file mode 100644 index 0000000..7ae6fd8 --- /dev/null +++ b/script/scenarios/demos/siggraph_asia/log.txt @@ -0,0 +1,346 @@ +path computation 27 +path computation 8 +path computation 11 +path computation 20 +path computation 4 +path computation 4 +path computation 4 +path computation 9 +path computation 4 +path computation 4 +path computation 7 +path computation 10 +path computation 4 +path computation 8 +path computation 10 +path computation 8 +path computation 9 +path computation 13 +path computation 10 +path computation 8 +path computation 13 +path computation 9 +path computation 10 +path computation 17 +path computation 11 +path computation 8 +path computation 5 +path computation 9 +path computation 9 +path computation 8 +path computation 13 +path computation 9 +path computation 4 +path computation 7 +path computation 14 +path computation 13 +path computation 8 +path computation 4 +path computation 3 +path computation 4 +path computation 6 +path computation 7 +path computation 2 +path computation 8 +path computation 3 +path computation 2 +path computation 10 +path computation 4 +path computation 9 +path computation 8 +path computation 2 +path computation 4 +path computation 3 +path computation 3 +path computation 6 +path computation 20 +path computation 9 +path computation 15 +path computation 17 +path computation 8 +path computation 7 +path computation 10 +path computation 7 +path computation 11 +path computation 8 +path computation 15 +path computation 10 +path computation 12 +path computation 13 +path computation 18 +path computation 17 +path computation 8 +path computation 14 +path computation 17 +path computation 15 +path computation 10 +path computation 15 +path computation 6 +path computation 8 +path computation 14 +path computation 11 +path computation 8 +path computation 12 +path computation 8 +path computation 9 +path computation 12 +path computation 9 +path computation 4 +path computation 12 +path computation 15 +path computation 13 +path computation 7 +path computation 7 +path computation 4 +path computation 10 +path computation 14 +path computation 12 +path computation 12 +path computation 13 +path computation 8 +path computation 11 +path computation 7 +path computation 15 +path computation 8 +path computation 5 +path computation 4 +path computation 7 +path computation 4 +path computation 9 +path computation 3 +path computation 5 +path computation 10 +path computation 9 +path computation 3 +path computation 5 +path computation 1 +path computation 2 +path computation 2 +path computation 5 +path computation 2 +path computation 4 +path computation 4 +path computation 1 +path computation 7 +path computation 1 +path computation 9 +path computation 2 +path computation 5 +path computation 3 +path computation 3 +path computation 2 +path computation 5 +path computation 5 +path computation 6 +path computation 7 +path computation 3 +path computation 4 +path computation 2 +path computation 3 +path computation 11 +path computation 4 +path computation 2 +path computation 6 +path computation 9 +path computation 6 +path computation 9 +path computation 6 +path computation 12 +path computation 16 +path computation 5 +path computation 10 +path computation 7 +path computation 7 +path computation 5 +path computation 3 +path computation 6 +path computation 5 +path computation 6 +path computation 7 +path computation 9 +path computation 8 +path computation 4 +path computation 8 +path computation 5 +path computation 3 +path computation 6 +path computation 11 +path computation 7 +path computation 4 +path computation 5 +path computation 6 +path computation 9 +path computation 10 +path computation 11 +path computation 7 +path computation 9 +path computation 3 +path computation 3 +path computation 4 +path computation 3 +path computation 3 +path computation 3 +path computation 5 +path computation 3 +path computation 4 +path computation 6 +path computation 7 +path computation 9 +path computation 7 +path computation 4 +path computation 7 +path computation 7 +path computation 5 +path computation 4 +path computation 5 +path computation 7 +path computation 7 +path computation 4 +path computation 4 +path computation 6 +path computation 5 +path computation 9 +path computation 9 +path computation 8 +path computation 6 +path computation 3 +path computation 7 +path computation 7 +path computation 9 +path computation 5 +path computation 6 +path computation 5 +path computation 9 +path computation 9 +path computation 9 +path computation 11 +path computation 6 +path computation 11 +path computation 9 +path computation 4 +path computation 10 +path computation 63 +path computation 3 +path computation 7 +path computation 4 +path computation 4 +path computation 11 +path computation 5 +path computation 5 +path computation 6 +path computation 4 +path computation 4 +path computation 4 +path computation 7 +path computation 4 +path computation 3 +path computation 6 +path computation 5 +path computation 8 +path computation 10 +path computation 16 +path computation 16 +path computation 14 +path computation 5 +path computation 8 +path computation 7 +path computation 4 +path computation 5 +path computation 5 +path computation 4 +path computation 3 +path computation 11 +path computation 5 +path computation 3 +path computation 4 +path computation 3 +path computation 11 +path computation 6 +path computation 7 +path computation 4 +path computation 3 +path computation 5 +path computation 9 +path computation 5 +path computation 8 +path computation 8 +path computation 4 +path computation 7 +path computation 7 +path computation 4 +path computation 3 +path computation 3 +path computation 6 +path computation 3 +path computation 4 +path computation 9 +path computation 5 +path computation 3 +path computation 3 +path computation 7 +path computation 8 +path computation 8 +path computation 3 +path computation 9 +path computation 10 +path computation 4 +path computation 5 +path computation 9 +path computation 5 +path computation 6 +path computation 4 +path computation 7 +path computation 11 +path computation 8 +path computation 4 +path computation 10 +path computation 6 +path computation 4 +path computation 8 +path computation 5 +path computation 8 +path computation 5 +path computation 4 +path computation 6 +path computation 3 +path computation 2 +path computation 3 +path computation 11 +path computation 6 +path computation 4 +path computation 12 +path computation 5 +path computation 6 +path computation 4 +path computation 7 +path computation 7 +path computation 5 +path computation 7 +path computation 10 +path computation 10 +path computation 4 +path computation 10 +path computation 7 +path computation 7 +path computation 11 +path computation 4 +path computation 11 +path computation 5 +path computation 5 +path computation 8 +path computation 8 +path computation 5 +path computation 9 +path computation 8 +path computation 6 +path computation 2 +path computation 5 +path computation 2 +path computation 2 +path computation 8 +path computation 13 +path computation 7 +path computation 10 +path computation 9 +path computation 6 +path computation 7 diff --git a/script/scenarios/demos/siggraph_asia/scale_hrp2_interp.py b/script/scenarios/demos/siggraph_asia/scale_hrp2_interp.py index 1057901..3f6f8d2 100644 --- a/script/scenarios/demos/siggraph_asia/scale_hrp2_interp.py +++ b/script/scenarios/demos/siggraph_asia/scale_hrp2_interp.py @@ -111,8 +111,8 @@ q_goal = fullBody.generateContacts(q_goal, [0,0,1]) q_init = fullBody.generateContacts(q_init, [0,0,1]) #~ r(q_goal) -#~ fullBody.setStartState(q_init,[rLegId,lLegId,rarmId]) #,rarmId,larmId]) -fullBody.setStartState(q_init,[rLegId,lLegId]) #,rarmId,larmId]) +fullBody.setStartState(q_init,[rLegId,lLegId,rarmId]) #,rarmId,larmId]) +#~ fullBody.setStartState(q_init,[rLegId,lLegId]) #,rarmId,larmId]) fullBody.setEndState(q_goal,[rLegId,lLegId])#,rarmId,larmId]) #~ #~ configs = fullBody.interpolate(0.1) @@ -274,14 +274,14 @@ def play_all_paths_qs(): if i % 2 == 0 : pp(pid) -def test(stateid = 1, path = False, use_rand = False, just_one_curve = False) : +def test(stateid = 1, path = False, use_rand = False, just_one_curve = False, num_optim = 0) : com_1 = __get_com(fullBody, configs[stateid]) com_2 = __get_com(fullBody, configs[stateid+1]) data = gen_sequence_data_from_state(fullBody,stateid,configs, mu = 1.) c_bounds_1 = get_com_constraint(fullBody, stateid, configs[stateid], limbsCOMConstraints, interm = False) c_bounds_mid = get_com_constraint(fullBody, stateid, configs[stateid], limbsCOMConstraints, interm = True) c_bounds_2 = get_com_constraint(fullBody, stateid, configs[stateid+1], limbsCOMConstraints, interm = False) - success, c_mid_1, c_mid_2 = solve_quasi_static(data, c_bounds = [c_bounds_1, c_bounds_2, c_bounds_mid], use_rand = use_rand) + success, c_mid_1, c_mid_2 = solve_quasi_static(data, c_bounds = [c_bounds_1, c_bounds_2, c_bounds_mid], use_rand = use_rand, mu = 0.8, fullBody = fullBody) #~ success, c_mid_1, c_mid_2 = solve_dyn(data, c_bounds = [c_bounds_1, c_bounds_2, c_bounds_mid], use_rand = use_rand) #~ success, c_mid_1, c_mid_2 = solve_dyn(data, c_bounds = [c_bounds_1, c_bounds_2]) @@ -292,12 +292,12 @@ def test(stateid = 1, path = False, use_rand = False, just_one_curve = False) : if just_one_curve: bezier_0 = __Bezier([com_1,c_mid_1[0].tolist(),c_mid_2[0].tolist(),com_2]) - p0 = fullBody.generateCurveTrajParts(bezier_0,[0.,0.1,0.9,1.]) + p0 = fullBody.generateCurveTrajParts(bezier_0,[0.,0.3,0.9,1.]) print "p0", p0 #~ pp.displayPath(p0+1) #~ pp.displayPath(p0+2) pp.displayPath(p0) - paths_ids = [int(el) for el in fullBody.comRRTFromPos(stateid,p0+1,p0+2,p0+3)] + paths_ids = [int(el) for el in fullBody.comRRTFromPos(stateid,p0+1,p0+2,p0+3,num_optim)] else: bezier_0 = __Bezier([com_1,c_mid_1[0].tolist()] , end_acc = c_mid_1[1].tolist() , end_vel = [0.,0.,0.]) bezier_1 = __Bezier([c_mid_1[0].tolist(),c_mid_2[0].tolist()], end_acc = c_mid_2[1].tolist(), init_acc = c_mid_1[1].tolist(), init_vel = [0.,0.,0.], end_vel = [0.,0.,0.]) @@ -310,12 +310,12 @@ def test(stateid = 1, path = False, use_rand = False, just_one_curve = False) : pp.displayPath(p0) pp.displayPath(p0+1) pp.displayPath(p0+2) - paths_ids = [int(el) for el in fullBody.comRRTFromPos(stateid,p0,p0+1,p0+2)] + paths_ids = [int(el) for el in fullBody.comRRTFromPos(stateid,p0,p0+1,p0+2,num_optim)] #~ paths_ids = [] global allpaths allpaths += paths_ids[:-1] #~ allpaths += [paths_ids[-1]] - pp(paths_ids[-1]) + #~ pp(paths_ids[-1]) #~ return success, paths_ids, c_mid_1, c_mid_2 return success, c_mid_1, c_mid_2, paths_ids @@ -372,7 +372,7 @@ def gen(ine_curve =False): #~ test(3, True, True, True) test(4, True, True, ine_curve) test(5, True, True, ine_curve) - a = gen_trajectory_to_play(fullBody, pp, allpaths, flatten([[0.1, 0.9, 0.1] for _ in range(len(allpaths) / 3)])) + a = gen_trajectory_to_play(fullBody, pp, allpaths, flatten([[0.3, 0.6, 0.1] for _ in range(len(allpaths) / 3)])) #~ pp(29),pp(9),pp(17) #~ gen(True) -- GitLab