Commit 1855b20b authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

Minors changes in scripts

parent ca3bd590
......@@ -108,7 +108,7 @@ install(FILES
data/urdf/sideWall.urdf
data/urdf/sideWall_long.urdf
data/urdf/downSlope.urdf
data/urdf/downSlope.urdf
data/urdf/slalom.urdf
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/urdf
)
install(FILES
......
......@@ -109,13 +109,17 @@ player = fullBodyPlayerHrp2.Player(fullBody,pp,tp,configs,draw=False,use_window=
#player.displayContactPlan()
player.interpolate(3,20)
player.interpolate(4,5)
"""
import hpp.corbaserver.rbprm.tools.cwc_trajectory
import hpp.corbaserver.rbprm.tools.path_to_trajectory
import hpp.corbaserver.rbprm.tools.cwc_trajectory_helper
reload(hpp.corbaserver.rbprm.tools.cwc_trajectory)
reload(hpp.corbaserver.rbprm.tools.path_to_trajectory)
reload(hpp.corbaserver.rbprm.tools.cwc_trajectory_helper)
reload(fullBodyPlayerHrp2)
......
......@@ -26,7 +26,7 @@ urdfName = 'hrp2_trunk_flexible'
urdfNameRom = ['hrp2_larm_rom','hrp2_rarm_rom','hrp2_lleg_rom','hrp2_rleg_rom']
urdfSuffix = ""
srdfSuffix = ""
vMax = 4;
vMax = 2;
aMax = 6;
extraDof = 6
......@@ -48,7 +48,7 @@ rbprmBuilder.setAffordanceFilter('hrp2_rleg_rom', ['Support'])
# We also bound the rotations of the torso. (z, y, x)
rbprmBuilder.boundSO3([-0.1,0.1,-0.65,0.65,-0.2,0.2])
rbprmBuilder.client.basic.robot.setDimensionExtraConfigSpace(extraDof)
rbprmBuilder.client.basic.robot.setExtraConfigSpaceBounds([-4,4,-1,1,-2,2,0,0,0,0,0,0])
rbprmBuilder.client.basic.robot.setExtraConfigSpaceBounds([-2,2,-0.5,0.5,-2,2,0,0,0,0,0,0])
indexECS = rbprmBuilder.getConfigSize() - rbprmBuilder.client.basic.robot.getDimensionExtraConfigSpace()
# Creating an instance of HPP problem solver and the viewer
......
......@@ -28,8 +28,8 @@ class Player (object):
self.larmId : {'file': "hyq/"+self.larmId+"_com.ineq", 'effector' : self.lHand} }
def act(self,i, numOptim = 0, use_window = 0, friction = 0.5, optim_effectors = True, time_scale = 1, verbose = True, draw = False, trackedEffectors = []):
return step(self.fullBody, self.configs, i, numOptim, self.pp, self.limbsCOMConstraints, friction, optim_effectors = optim_effectors, time_scale = time_scale, useCOMConstraints = False, use_window = use_window,
def act(self,i, numOptim = 0, use_window = 1, friction = 0.5, optim_effectors = True, time_scale = 1, verbose = True, draw = False, trackedEffectors = []):
return step(self.fullBody, self.configs, i, numOptim, self.pp, self.limbsCOMConstraints, friction, optim_effectors = optim_effectors, time_scale = time_scale, useCOMConstraints = True, use_window = use_window,
verbose = verbose, draw = draw, trackedEffectors = trackedEffectors,use_velocity=self.use_velocity, pathId = self.pathId)
def initConfig(self):
......@@ -101,7 +101,7 @@ class Player (object):
for i in range(begin,end):
self.act(i,1,optim_effectors=self.optim_effector,draw=self.draw)
def play(self,frame_rate = 1./60.):
def play(self,frame_rate = 0.01):
play_traj(self.fullBody,self.pp,frame_rate)
......@@ -28,6 +28,13 @@ time.sleep(2)
player.displayContactPlan(1)
tp.r.stopCapture ()
import time
r(configs[6])
tp.r.startCapture ("capture/capture","png")
time.sleep(2)
player.play(1/2.)
tp.r.stopCapture ()
......@@ -38,7 +45,7 @@ tp.r.stopCapture ()
"""
## avconv (bash) commands
avconv -i capture_0_%d.png -r 30 -vcodec mpeg4 -qscale 1 -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -y downSlope_hrp2_contactPlan2.mp4
avconv -i capture_0_%d.png -r 30 -vcodec mpeg4 -qscale 1 -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -y downSlope_hrp2_interpolation2.mp4
avconv -i capture_0_%d.png -r 30 -vcodec mpeg4 -qscale 1 -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 2 hyq_darpa.mp4
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment