createContext (args.context) isSimulation = args.context == "simulation" # 2}}} # {{{2 Robot and problem definition #Robot.urdfFilename = "package://tiago_data/robots/tiago_steel_without_wheels.urdf" #Robot.srdfFilename = "package://tiago_data/srdf/tiago.srdf" # try: import rospy # Robot.urdfString = rospy.get_param('robot_description') # print("reading URDF from ROS param") # except: print("reading generic URDF") from hpp.rostools import process_xacro, retrieve_resource Robot.urdfString = process_xacro("package://tiago_data/robots/tiago.urdf.xacro", "robot:=steel", "end_effector:=pal-hey5", "ft_sensor:=schunk-ft", "has_second_camera_model:=true") Robot.srdfString = "" if args.n_random_handles is None: srdf_cylinder = "package://agimus_demos/srdf/cylinder.srdf" else: from generate_obstacle_model import generate_srdf bvh_file = "/home/jmirabel/devel/hpp/src/agimus-demos/meshes/cylinder.stl" srdf_cylinder = "/tmp/cylinder.srdf" with open(srdf_cylinder, 'w') as output: generate_srdf(bvh_file, args.n_random_handles, output) class Cylinder: urdfFilename = "package://agimus_demos/urdf/cylinder.urdf" srdfFilename = srdf_cylinder rootJointType = "freeflyer"
type=int, default=None, help="Generate a random model with N handles.") args = p.parse_args() if args.context != defaultContext: createContext(args.context) isSimulation = args.context == "simulation" # 2}}} # {{{2 Robot and problem definition #Robot.urdfFilename = "package://tiago_data/robots/tiago_steel_without_wheels.urdf" #Robot.srdfFilename = "package://tiago_data/srdf/tiago.srdf" from hpp.rostools import process_xacro, retrieve_resource Robot.urdfString = process_xacro( "package://tiago_description/robots/tiago.urdf.xacro", "robot:=steel", "end_effector:=pal-hey5", "ft_sensor:=schunk-ft") Robot.srdfString = "" if args.n_random_handles is None: srdf_cylinder = "package://agimus_demos/srdf/cylinder.srdf" else: from generate_obstacle_model import generate_srdf bvh_file = "/home/jmirabel/devel/hpp/src/agimus-demos/meshes/cylinder.stl" srdf_cylinder = "/tmp/cylinder.srdf" with open(srdf_cylinder, 'w') as output: generate_srdf(bvh_file, args.n_random_handles, output) class Cylinder: urdfFilename = "package://agimus_demos/urdf/cylinder.urdf"