Project
Here we describe the building steps of a simulation project, by using GrxUI.
First, start GrxUI.
Model
In this sample, we are going to create a simulation project of a walking robot.
Which means we have to have at least 2 models; the robot model and floor.
First, Right-click on "Model" in "Item View" panel, and select "Load".
Load "sample.wrl" and "floor.wrl", placed in "OpenHRP3/etc" folder.
Then, right-click on model "floor" and select "change into environment model";
so that floor can be specified as an environmental model.
Now we specify the initial posture of the robot.
For that, follow the steps shown in Fig.1 and set the properties of the model as described in Table.1 .
Fig.1 : Property editing steps
Table.1 : Sample robot properties
CHEST.angle | 0.0 |
LARM_ELBOW.angle | -1.5708 |
LARM_SHOULDER_P.angle | 0.174533 |
LARM_SHOULDER_R.angle | -0.003490 |
LARM_SHOULDER_Y.angle | 0.0 |
LARM_WRIST_P.angle | 0.0 |
LARM_WRIST_R.angle | 0.0 |
LARM_WRIST_Y.angle | 0.0 |
LLEG_ANKLE_P.angle | -0.0424675 |
LLEG_ANKLE_R.angle | 0.0 |
LLEG_HIP_P.angle | -0.0360373 |
LLEG_HIP_R.angle | 0.0 |
LLEG_HIP_Y.angle | 0.0 |
LLEG_KNEE.angle | 0.0785047 |
RARM_ELBOW.angle | -1.5708 |
RARM_SHOULDER_P.angle | 0.174533 |
RARM_SHOULDER_R.angle | -0.003490 |
RARM_SHOULDER_Y.angle | 0.0 |
RARM_WRIST_P.angle | 0.0 |
RARM_WRIST_R.angle | 0.0 |
RARM_WRIST_Y.angle | 0.0 |
RLEG_ANKLE_P.angle | -0.0424675 |
RLEG_ANKLE_R.angle | 0.0 |
RLEG_HIP_P.angle | -0.0360373 |
RLEG_HIP_R.angle | 0.0 |
RLEG_HIP_Y.angle | 0.0 |
RLEG_KNEE.angle | 0.0785047 |
WAIST.rotation | 0.0 1.0 0.0 0.0 |
WAIST.translation | 0.0 0.0 0.713 |
WAIST_P.angle | 0.0 |
WAIST_R.angle | 0.0 |
WorldState
Here we create "WorldState" and configure the parameters.
Right-click "WorldState" in the "Item View" panel, and select "create".
Fig.2 : WorldState
Now select "OpenHRP" tab, then "simulation" tab. Set each parameters as described in Table.2 .
Table.2 : Simulation Parameters
Total Times[s] | 13.4 |
Integration Step[s] | 0.0020 |
Logging Step[s] | 0.0020 |
Integration Method | RUNGE_KUTTA |
Gravity[ms-2] | 9.8 |
Fig.3 : Simulation Parameters
Collision Pair
Here we are going to specify the collision check between floor and robot; (We call them "Collision pair").
First, select "collision" tab in the "OpenHRP" tab.
Fig.4 : Collision tab
Now Click "Add" button. Select "sample" as Object1, and "floor" as Object2, and then click "OK"
button.
Fig.5 : Addding Collision Pair
Controller
Now we configure the controller.
Select "controller" tab in the "OpenHRP" tab.
Specify controller parameters as described in Table.3 .
If "SamplePDController" is not available at there to select, please enter by your self.
Note:
The parameter values in Table.3 are given as an example and those are specific for this particular
controller (SamplePD). When you create and use you own controller, you are always free to change
these values and use suitable values for the parameters.
Table.3 : Controller Parameters
Controller | SamplePDController |
Control Time[s] | 0.002 |
Working Dir. | $(OPENHRPHOME)/Controller/rtc/SamplePD |
Setup Command | SamplePD$(BIN_SFX) |
Fig.6 : Controller tab
Simulation
Now we are going to start simulation process by executing the created controller-component.
For that, just click on "Start simulation" button in GrxUI, as shown in Fig.7 .
Fig.7 : Start simulation
Saving Project File
you can save the created project file, by selecting "File" → "Save Project" from menubar.