예제 #1
0
from hpp.corbaserver.rbprm.talos_abstract import Robot
from hpp.gepetto import Viewer
from hpp.corbaserver import Client
from hpp.corbaserver import ProblemSolver
import time

Robot.urdfName += "_large"
vMax = 0.3  # linear velocity bound for the root
aMax = 0.1  # linear acceleration bound for the root
extraDof = 6
mu = 0.5  # coefficient of friction
# Creating an instance of the helper class, and loading the robot
rbprmBuilder = Robot()
# Define bounds for the root : bounding box of the scenario
root_bounds = [-2.3, 4.6, -1.5, 3.3, 0.98, 0.98]
rbprmBuilder.setJointBounds("root_joint", root_bounds)
# As this scenario only consider walking, we fix the DOF of the torso :
rbprmBuilder.setJointBounds('torso_1_joint', [0, 0])
rbprmBuilder.setJointBounds('torso_2_joint', [0.006761, 0.006761])

# The following lines set constraint on the valid configurations:
# a configuration is valid only if all limbs can create a contact with the corresponding afforcances type
rbprmBuilder.setFilter(['talos_lleg_rom', 'talos_rleg_rom'])
rbprmBuilder.setAffordanceFilter('talos_lleg_rom', [
    'Support',
])
rbprmBuilder.setAffordanceFilter('talos_rleg_rom', ['Support'])
# We also bound the rotations of the torso. (z, y, x)
rbprmBuilder.boundSO3([-4., 4., -0.1, 0.1, -0.1, 0.1])
# Add 6 extraDOF to the problem, used to store the linear velocity and acceleration of the root
rbprmBuilder.client.robot.setDimensionExtraConfigSpace(extraDof)
예제 #2
0
from hpp.gepetto import Viewer
from hpp.corbaserver import ProblemSolver
import numpy as np
from pinocchio import Quaternion
import time
statusFilename = "/res/infos.log"

vMax = 0.5  # linear velocity bound for the root
vInit = 0.05  # initial / final velocity to fix the direction
vGoal = 0.01
aMax = 0.05  # linear acceleration bound for the root
extraDof = 6
mu = 0.5  # coefficient of friction
# Creating an instance of the helper class, and loading the robot
# Creating an instance of the helper class, and loading the robot
rbprmBuilder = Robot()
# Define bounds for the root : bounding box of the scenario
rbprmBuilder.setJointBounds("root_joint", [-2, 2, -2, 2, 1., 1.])

# The following lines set constraint on the valid configurations:
# a configuration is valid only if all limbs can create a contact with the corresponding afforcances type
rbprmBuilder.setFilter(['talos_lleg_rom', 'talos_rleg_rom'])
rbprmBuilder.setAffordanceFilter('talos_lleg_rom', [
    'Support',
])
rbprmBuilder.setAffordanceFilter('talos_rleg_rom', ['Support'])
# We also bound the rotations of the torso. (z, y, x)
rbprmBuilder.boundSO3([-1.7, 1.7, -0.1, 0.1, -0.1, 0.1])
# Add 6 extraDOF to the problem, used to store the linear velocity and acceleration of the root
rbprmBuilder.client.robot.setDimensionExtraConfigSpace(extraDof)
# We set the bounds of this extraDof with velocity and acceleration bounds (expect on z axis)
from hpp.gepetto import Viewer
from hpp.corbaserver import Client
from hpp.corbaserver.rbprm.talos_abstract import Robot
#Robot.urdfName += "_large"

packageName = 'hpp_environments'
meshPackageName = 'hpp_environments'

import time
time.sleep(1)

rbprmBuilder = Robot()
rbprmBuilder.setJointBounds(
    "root_joint", [-5, 5, -5, 5, 0.95, 1.0
                   ])  #rbprmBuilder.ref_height,rbprmBuilder.ref_height])
# As this scenario only consider walking, we fix the DOF of the torso :
rbprmBuilder.setJointBounds('torso_1_joint', [0, 0])
rbprmBuilder.setJointBounds('torso_2_joint', [0., 0.])
vMax = 1.  # linear velocity bound for the root
aMax = 2.  # linear acceleration bound for the root
extraDof = 6
mu = 10.  # coefficient of friction
rbprmBuilder.setFilter([])

rbprmBuilder.setAffordanceFilter(Robot.rLegId, [
    'Support',
])
rbprmBuilder.setAffordanceFilter(Robot.lLegId, ['Support'])
rbprmBuilder.boundSO3([-4., 4., -0.1, 0.1, -0.1, 0.1])
# Add 6 extraDOF to the problem, used to store the linear velocity and acceleration of the root
rbprmBuilder.client.robot.setDimensionExtraConfigSpace(extraDof)
예제 #4
0
from hpp.corbaserver.rbprm.talos_abstract import Robot
from hpp.gepetto import Viewer
from hpp.corbaserver import Client
from hpp.corbaserver import ProblemSolver
import time

statusFilename = "infos.log"
Robot.urdfName += "_large"

vMax = 0.3  # linear velocity bound for the root
aMax = 0.05  # linear acceleration bound for the root
extraDof = 6
mu = 0.5  # coefficient of friction
# Creating an instance of the helper class, and loading the robot
rbprmBuilder = Robot()
# Define bounds for the root : bounding box of the scenario
root_bounds = [-0.9, 2.55, -0.13, 2., 0.98, 1.6]
rbprmBuilder.setJointBounds("root_joint", root_bounds)
# As this scenario only consider walking, we fix the DOF of the torso :
rbprmBuilder.setJointBounds('torso_1_joint', [0, 0])
rbprmBuilder.setJointBounds('torso_2_joint', [0., 0.])

# The following lines set constraint on the valid configurations:
# a configuration is valid only if all limbs can create a contact with the corresponding afforcances type
rbprmBuilder.setFilter(['talos_lleg_rom', 'talos_rleg_rom'])
rbprmBuilder.setAffordanceFilter('talos_lleg_rom', [
    'Support',
])
rbprmBuilder.setAffordanceFilter('talos_rleg_rom', ['Support'])
# We also bound the rotations of the torso. (z, y, x)
rbprmBuilder.boundSO3([-4., 4., -0.1, 0.1, -0.1, 0.1])
예제 #5
0
from hpp.corbaserver.rbprm.talos_abstract import Robot
from hpp.gepetto import Viewer
from hpp.corbaserver import ProblemSolver
import numpy as np
from pinocchio import Quaternion
import time

Robot.urdfName += "_large"

vMax = 0.5# linear velocity bound for the root
aMax = 0.7# linear acceleration bound for the root
extraDof = 6
mu=0.5# coefficient of friction
# Creating an instance of the helper class, and loading the robot
# Creating an instance of the helper class, and loading the robot
rbprmBuilder = Robot ()
# Define bounds for the root : bounding box of the scenario
rbprmBuilder.setJointBounds ("root_joint", [0,18.5, 0, 24., rbprmBuilder.ref_height, rbprmBuilder.ref_height])
rbprmBuilder.setJointBounds ('torso_1_joint', [0,0])
rbprmBuilder.setJointBounds ('torso_2_joint', [0,0])


# The following lines set constraint on the valid configurations:
# a configuration is valid only if all limbs can create a contact with the corresponding afforcances type
rbprmBuilder.setFilter(['talos_lleg_rom','talos_rleg_rom'])
rbprmBuilder.setAffordanceFilter('talos_lleg_rom', ['Support',])
rbprmBuilder.setAffordanceFilter('talos_rleg_rom', ['Support'])
# We also bound the rotations of the torso. (z, y, x)
rbprmBuilder.boundSO3([-4,4,-0.1,0.1,-0.1,0.1])
# Add 6 extraDOF to the problem, used to store the linear velocity and acceleration of the root
rbprmBuilder.client.robot.setDimensionExtraConfigSpace(extraDof)
예제 #6
0
from hpp.gepetto import Viewer
from hpp.corbaserver import Client
from hpp.corbaserver.rbprm.talos_abstract import Robot
Robot.urdfName += "_large"

packageName = 'hpp_environments'
meshPackageName = 'hpp_environments'

import time
time.sleep(1)

rbprmBuilder = Robot()
rbprmBuilder.setJointBounds("root_joint", [-3.2, 1.8, 0.19, 0.21, 0.95, 1.7])
# As this scenario only consider walking, we fix the DOF of the torso :
rbprmBuilder.setJointBounds('torso_1_joint', [0, 0])
rbprmBuilder.setJointBounds('torso_2_joint', [0., 0.])
vMax = 1.  # linear velocity bound for the root
aMax = 2.  # linear acceleration bound for the root
extraDof = 6
mu = 0.5  # coefficient of friction
rbprmBuilder.setFilter([Robot.rLegId, Robot.lLegId])

rbprmBuilder.setAffordanceFilter(Robot.rLegId, [
    'Support',
])
rbprmBuilder.setAffordanceFilter(Robot.lLegId, ['Support'])
rbprmBuilder.boundSO3([-4., 4., -0.1, 0.1, -0.1, 0.1])
# Add 6 extraDOF to the problem, used to store the linear velocity and acceleration of the root
rbprmBuilder.client.robot.setDimensionExtraConfigSpace(extraDof)
# We set the bounds of this extraDof with velocity and acceleration bounds (expect on z axis)
extraDofBounds = [
예제 #7
0
p_start = [float(v) for v in line]
p_start[2] += 0.98
line = f.readline().split()
p_goal = [float(v) for v in line]
p_goal[2] += 0.98
line = f.readline().split()
x_min = float(line[0])
x_max = float(line[1])
line = f.readline().split()
y_min = float(line[0])
y_max = float(line[1])
line = f.readline().split()
z_min = float(line[0])
z_max = float(line[1])

rbprmBuilder = Robot()
# rbprmBuilder.setJointBounds ("root_joint", [-3.2,1.8,0.19,0.21, 0.95,1.7])
rbprmBuilder.setJointBounds(
    "root_joint", [x_min, x_max, y_min, y_max, z_min + 0.95, z_max + 1.0])
# As this scenario only consider walking, we fix the DOF of the torso :
rbprmBuilder.setJointBounds('torso_1_joint', [0, 0])
rbprmBuilder.setJointBounds('torso_2_joint', [0., 0.])
vMax = 1.  # linear velocity bound for the root
aMax = 2.  # linear acceleration bound for the root
extraDof = 6
mu = 0.5  # coefficient of friction
rbprmBuilder.setFilter([Robot.rLegId, Robot.lLegId])

rbprmBuilder.setAffordanceFilter(Robot.rLegId, [
    'Support',
])