Exemple #1
0
def Generate_Body():
    pyrosim.Start_URDF("body.urdf")

    pyrosim.Send_Cube(name="Torso", pos=[1,0,1.5], size=[length,width,height])
    pyrosim.Send_Joint(name="Torso_BackLeg", parent="Torso", child="BackLeg", type="revolute", position="0.5 0 1.0")
    pyrosim.Send_Cube(name="BackLeg", pos=[-0.5,0,-0.5], size=[length,width,height])
    pyrosim.Send_Joint(name="Torso_FrontLeg", parent="Torso", child="FrontLeg", type="revolute", position="1.5 0 1.0")
    pyrosim.Send_Cube(name="FrontLeg", pos=[0.5,0,-0.5], size=[length,width,height])


    pyrosim.End()
Exemple #2
0
def Generate_Body():
    pyrosim.Start_URDF("body.urdf")
    # Robot Torso
    pyrosim.Send_Cube(name="Torso", pos=[1.5, 0, 1.5], size=[length, width, height])
    # Connect BackLeg to Torso with one joint
    pyrosim.Send_Joint(name="Torso_FrontLeg", parent="Torso", child="FrontLeg", type="revolute", position="2.0 0.0 1.0")
    # Robot FrontLeg
    pyrosim.Send_Cube(name="FrontLeg", pos=[0.5, 0, -0.5], size=[length, width, height])
    # Connect FrontLeg to Torso with a second joint.
    pyrosim.Send_Joint(name="Torso_BackLeg", parent="Torso", child="BackLeg", type="revolute", position="1.0 0.0 1.0")
    # The other BackLeg
    pyrosim.Send_Cube(name="BackLeg", pos=[-0.5, 0, -0.5], size=[length, width, height])
    # End
    pyrosim.End()
Exemple #3
0
def Create_Robot():
    pyrosim.Start_URDF("body.urdf")

    pyrosim.Send_Cube(name="Torso", pos=[0, 0, 1.5], size=[1, 1, 1])

    pyrosim.Send_Joint(name="Torso_Leg_F",
                       parent="Torso",
                       child="LegFront",
                       type="revolute",
                       position="0.5 0 1")
    pyrosim.Send_Cube(name="LegFront", pos=[0.5, 0, -.5], size=[1, 1, 1])

    pyrosim.Send_Joint(name="Torso_Leg_B",
                       parent="Torso",
                       child="LegBack",
                       type="revolute",
                       position="-0.5 0 1")
    pyrosim.Send_Cube(name="LegBack", pos=[-0.5, 0, -.5], size=[1, 1, 1])

    pyrosim.End()
Exemple #4
0
    def Create_Body(self):
        pyrosim.Start_URDF("body.urdf")

        pyrosim.Send_Cube(name="Torso", pos=[0, 0, 1], size=[1, 1, 1])
        pyrosim.Send_Joint(name="Torso_FrontLeg",
                           parent="Torso",
                           child="FrontLeg",
                           type="revolute",
                           position="0.0 0.5 1.0",
                           jointAxis="1 0 0")
        pyrosim.Send_Cube(name="FrontLeg", pos=[0, 0.5, 0], size=[0.2, 1, 0.2])

        pyrosim.Send_Joint(name="Torso_BackLeg",
                           parent="Torso",
                           child="BackLeg",
                           type="revolute",
                           position="0.0 -0.5 1.0",
                           jointAxis="1 0 0")
        pyrosim.Send_Cube(name="BackLeg", pos=[0, -0.5, 0], size=[0.2, 1, 0.2])

        # Left-leg
        pyrosim.Send_Joint(name="Torso_LeftLeg",
                           parent="Torso",
                           child="LeftLeg",
                           type="revolute",
                           position="-0.5 0.0 1.0",
                           jointAxis="0 1 0")
        pyrosim.Send_Cube(name="LeftLeg", pos=[-0.5, 0, 0], size=[1, 0.2, 0.2])
        # Right-leg
        pyrosim.Send_Joint(name="Torso_RightLeg",
                           parent="Torso",
                           child="RightLeg",
                           type="revolute",
                           position="0.5 0.0 1.0",
                           jointAxis="0 1 0")
        pyrosim.Send_Cube(name="RightLeg", pos=[0.5, 0, 0], size=[1, 0.2, 0.2])

        # front lower leg
        pyrosim.Send_Joint(name="FrontLeg_FrontLowerLeg",
                           parent="FrontLeg",
                           child="FrontLowerLeg",
                           type="revolute",
                           position="0.0 1.0 0.0",
                           jointAxis="1 0 0")
        pyrosim.Send_Cube(name="FrontLowerLeg",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        # back lower leg
        pyrosim.Send_Joint(name="BackLeg_BackLowerLeg",
                           parent="BackLeg",
                           child="BackLowerLeg",
                           type="revolute",
                           position="0.0 -1.0 0.0",
                           jointAxis="1 0 0")
        pyrosim.Send_Cube(name="BackLowerLeg",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        # left lower leg
        pyrosim.Send_Joint(name="LeftLeg_LeftLowerLeg",
                           parent="LeftLeg",
                           child="LeftLowerLeg",
                           type="revolute",
                           position="-1.0 0.0 0.0",
                           jointAxis="0 1 0")
        pyrosim.Send_Cube(name="LeftLowerLeg",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        # right lower leg
        pyrosim.Send_Joint(name="RightLeg_RightLowerLeg",
                           parent="RightLeg",
                           child="RightLowerLeg",
                           type="revolute",
                           position="1.0 0.0 0.0",
                           jointAxis="0 1 0")
        pyrosim.Send_Cube(name="RightLowerLeg",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        pyrosim.End()
Exemple #5
0
    def Create_Robot(self):
        pyrosim.Start_URDF("body.urdf")

        pyrosim.Send_Cube(name="Torso", pos=[0, 0, 1], size=[1, 1, 0.5])

        #Front Leg
        pyrosim.Send_Joint(name="Torso_Leg_F",
                           parent="Torso",
                           child="LegFront",
                           type="revolute",
                           position="0 0.5 1",
                           jointAxis='1 0 0')
        pyrosim.Send_Cube(name="LegFront", pos=[0, 0.5, 0], size=[0.2, 1, 0.2])

        pyrosim.Send_Joint(name="Leg_F_Leg_LF",
                           parent="LegFront",
                           child="LegLowerFront",
                           type="revolute",
                           position="0 1 0",
                           jointAxis='0 1 0')
        pyrosim.Send_Cube(name="LegLowerFront",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        #Back Leg
        pyrosim.Send_Joint(name="Torso_Leg_B",
                           parent="Torso",
                           child="LegBack",
                           type="revolute",
                           position="0 -0.5 1",
                           jointAxis='1 0 0')
        pyrosim.Send_Cube(name="LegBack", pos=[0, -0.5, 0], size=[0.2, 1, 0.2])

        pyrosim.Send_Joint(name="Leg_B_Leg_LB",
                           parent="LegBack",
                           child="LegLowerBack",
                           type="revolute",
                           position="0 -1 0",
                           jointAxis='0 1 0')
        pyrosim.Send_Cube(name="LegLowerBack",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        # Right Leg
        pyrosim.Send_Joint(name="Torso_Leg_R",
                           parent="Torso",
                           child="LegRight",
                           type="revolute",
                           position="0.5 0 1",
                           jointAxis='0 1 0')
        pyrosim.Send_Cube(name="LegRight", pos=[0.5, 0, 0], size=[1, 0.2, 0.2])

        pyrosim.Send_Joint(name="Leg_R_Leg_LR",
                           parent="LegRight",
                           child="LegLowerRight",
                           type="revolute",
                           position="1 0 0",
                           jointAxis='1 0 0')
        pyrosim.Send_Cube(name="LegLowerRight",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        # Left Leg
        pyrosim.Send_Joint(name="Torso_Leg_L",
                           parent="Torso",
                           child="LegLeft",
                           type="revolute",
                           position="-0.5 0 1",
                           jointAxis='0 1 0')
        pyrosim.Send_Cube(name="LegLeft", pos=[-0.5, 0, 0], size=[1, 0.2, 0.2])

        pyrosim.Send_Joint(name="Leg_L_Leg_LL",
                           parent="LegLeft",
                           child="LegLowerLeft",
                           type="revolute",
                           position="-1 0 0",
                           jointAxis='1 0 0')
        pyrosim.Send_Cube(name="LegLowerLeft",
                          pos=[0, 0, -0.5],
                          size=[0.2, 0.2, 1])

        pyrosim.End()