Commit 6a40b65c authored by Pierre Fernbach's avatar Pierre Fernbach

[Scripts] when changing the ROM names, correctly update the name in the robot

parent 85b703fc
......@@ -7,12 +7,15 @@ class PathPlanner(TalosPathPlanner):
# select ROM model with really conservative ROM shapes
Robot.urdfName = "talos_trunk_large_reducedROM"
self.robot_node_name = "talos_trunk_large_reducedROM"
Robot.urdfNameRom = ['talos_lleg_rom_reduced', 'talos_rleg_rom_reduced']
Robot.rLegId = 'talos_rleg_rom_reduced'
Robot.lLegId = 'talos_lleg_rom_reduced'
Robot.urdfNameRom = [Robot.lLegId, Robot.rLegId]
self.used_limbs = Robot.urdfNameRom
self.rbprmBuilder = Robot()
# As the ROM names have changed, we need to set this values again (otherwise it's automatically done)
self.rbprmBuilder.setReferenceEndEffector('talos_lleg_rom_reduced', self.rbprmBuilder.ref_EE_lLeg)
self.rbprmBuilder.setReferenceEndEffector('talos_rleg_rom_reduced', self.rbprmBuilder.ref_EE_rLeg)
self.rbprmBuilder.setReferenceEndEffector(Robot.lLegId, self.rbprmBuilder.ref_EE_lLeg)
self.rbprmBuilder.setReferenceEndEffector(Robot.rLegId, self.rbprmBuilder.ref_EE_rLeg)
def init_problem(self):
super().init_problem()
......
......@@ -26,10 +26,12 @@ class PathPlanner(TalosPathPlanner):
Robot.urdfName = "talos_trunk_large_reducedROM"
self.robot_node_name = "talos_trunk_large_reducedROM"
# select conservative ROM for feet
Robot.urdfNameRom += ['talos_lleg_rom_reduced', 'talos_rleg_rom_reduced']
Robot.rLegId = 'talos_rleg_rom_reduced'
Robot.lLegId = 'talos_lleg_rom_reduced'
Robot.urdfNameRom = [Robot.lLegId, Robot.rLegId]
self.rbprmBuilder = Robot()
self.rbprmBuilder.setReferenceEndEffector('talos_lleg_rom_reduced', self.rbprmBuilder.ref_EE_lLeg)
self.rbprmBuilder.setReferenceEndEffector('talos_rleg_rom_reduced', self.rbprmBuilder.ref_EE_rLeg)
self.rbprmBuilder.setReferenceEndEffector(Robot.lLegId, self.rbprmBuilder.ref_EE_lLeg)
self.rbprmBuilder.setReferenceEndEffector(Robot.rLegId, self.rbprmBuilder.ref_EE_rLeg)
def compute_extra_config_bounds(self):
# bounds for the extradof : by default use v_max/a_max on x and y axis and a large value on z axis
......
......@@ -37,12 +37,14 @@ class PathPlanner(TalosPathPlanner):
# select ROM model with really conservative ROM shapes
Robot.urdfName = "talos_trunk_large_reducedROM"
self.robot_node_name = "talos_trunk_large_reducedROM"
Robot.urdfNameRom = ['talos_lleg_rom_reduced', 'talos_rleg_rom_reduced']
Robot.rLegId = 'talos_rleg_rom_reduced'
Robot.lLegId = 'talos_lleg_rom_reduced'
Robot.urdfNameRom = [Robot.lLegId, Robot.rLegId]
self.used_limbs = Robot.urdfNameRom
self.rbprmBuilder = Robot()
# As the ROM names have changed, we need to set this values again (otherwise it's automatically done)
self.rbprmBuilder.setReferenceEndEffector('talos_lleg_rom_reduced', self.rbprmBuilder.ref_EE_lLeg)
self.rbprmBuilder.setReferenceEndEffector('talos_rleg_rom_reduced', self.rbprmBuilder.ref_EE_rLeg)
self.rbprmBuilder.setReferenceEndEffector(Robot.lLegId, self.rbprmBuilder.ref_EE_lLeg)
self.rbprmBuilder.setReferenceEndEffector(Robot.rLegId, self.rbprmBuilder.ref_EE_rLeg)
def set_random_configs(self):
from hpp.corbaserver.rbprm.tools.sampleRotation import sampleRotationForConfig
......
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