Prior to version 3.1, making models for Open-HRP involved using a text editor which was quite a pain. I think version 3.1 still has some problems so I will focus this tutorial on the previous version, 3.0.7 while using 3.1 to make the model.
Please check the Open-HRP website for details on how to install the software.
Once you have started the program, the first thing you might want to familiarize yourself with is the interface.
Holding down the left mouse button while moving the mouse changes the cameras orientation. Holding down the right mouse button while moving the mouse changes the cameras position. Holding down the middle mouse button while moving the mouse changes the zoom factor.
Once you start the program, you should see a screen as follows
Now proceed to right click on the model folder in the item viewer on the left and click on create from the menu that pops out. This will give you a new model with a single joint. If you left click on the arrow next to the new model it should expand to show you the text “root” with a joint icon next to it. This is the root joint. If you click on it then you should see a coordinate system as shown below
If you don’t see it then you may have to move the camera around and make sure that you didn’t double click on the new model or its root joint because that would disable it and make it invisible(disabled items have brackets around them, double clicking them re-enables them).
If you highlight the root joint by clicking it and select the “Property View” tab on the right, then you will be able to see various paramaters for the joint. You will notice that the joints have a mass, center of mass and a moment of inertia property these should be set accordingly for accurate modeling of your robot(the initial interia values are obscenely large).
However it is more interesting to see the kinematic structure take shape so you may want to leave the exact values for later. The other important properties are the translation which sets the joints translation with respect to its parent and the joint type which can be used to select between revolute and prismatic joints. Two special type of joints are the free and is the fixed joint. The free joint is able to translate and rotate freely while the fixed joint is unable to move with respect to its parent. Since the root joints parent is the global frame, selecting a fixed joint for the root will suspend the root in the air and make it unable to move. This is useful for doing air walks.
Now try the following, right click on the root joint > add primative shape > Box. This should place a huge gray box where your root joints coordinate frame used to be. Expand the root section by clicking on the arrow next to its icon, select the box, go to the property view and change the size from 1 1 1 to 0.1 0.1 0.1 , now it should be small enough to fit on the screen.
Next lets add some hip joints to the robot, right click on the root joint > add joint > type some appropriate name > ok.
This should place a joint at the same position as the root joint, but we dont want it at the same position so go the new joints property view and change the joints translation from 0 0 0 to 0 0 0.1. You should have something like this
Lets place a cylinder at the place where the legs joints are so we can see them. Add a new shape to the joint as was done last time but this time add a cylinder instead of a box. The size of the cylinder will once again be ridiculously large so resize it by changing its radius and height. Now also add a box to this joint and change its translation so that its below the joint, this will represent the upper legs body. If you repeat the same for the right side of the robots body then you should have something like the below. Be sure to add to make the left and right hip joint derive from the root joint and the future knee joint to derive from their associated hip joints so you have a kinematic tree structure with two branches, one for the left and right legs.
Congratulations you have the hips complete, now make the knees and ankles plus add some feet so you have something that looks like this
Ok as you can see we now have something that looks like the leg structure of a biped robot. However don’t pat yourself on the back yet, this is simple model which only has pitch joints(no yaw or roll joints) so it cant walk side ways or change its walking direction. Furthermore this model has no sensors yet.
You may want to try rotating the robots joints to get it into a cool looking pose by clicking on the “Joint Rotation” button on the left but if you do so now you will probably end up with something that looks like this
It seems the joints are rotating around the wrong axis, clearly this is not what we want. Reset the angle to 0 in the property view and change the joint axis(also in the property view) to 0.0 1.0 0.0 . Repeat this for all the joints then try the joint rotation button again, you should be able to get something like this:
This is better. Now we want to add sensors such as force sensors to the feet and gyros & accelerometers to the root joint.
This can be done by right clicking on the joint where you want the sensor and selecting “add sensor”. After selecting a name for the sensor we can change the sensors type and position from the property view.
Before you add the force sensors to the ankle joints you have to be aware of one big snag in Open-HRP. The gravity force of the joint where the force sensor derives from are NOT included in the force sensors read out. This means that if you placed a force sensor in the ankle then your force readout wont include effects occurring at the ankle. To fix this you have to add a sort of “Ghost” joint between the ankle and the foot. These Ghost joints should have negligible mass and be unable to move, this can be accomplished by setting their mass very low and setting their types to “fixed”. So go ahead and delete the boxes which represent the feet and replace them with Ghost joints at the same position as where the feet were. Once you did this then derive boxes representing the feet from these ghost joints. You can now go ahead and and add the force sensors to these Ghost joints.
Once you added all the sensors you want to have in your robot you have to set their Id’s(in the property window) so they can be uniquely identified. These Id’s have to start at 0 and form a continuous series until the last Id(dont skip any numbers). You may have wondered where the encoders are, well they are a integral part of the joints themselves. Therefore for the sake of being able to use the joint encoders and motors you have to set the jointId’s in the same way you did with the sensor Id’s.
Finally to polish up you may want to change some of the boxes and cylinders colors by playing with the diffuseColor property.
Right click on your models name(right above the root joint) and click save as then save it with the .wrl extension(otherwise Open-HRP might not be able to find it).
Ok you should have a functioning Open-HRP model, in the next section we will load it into Open-HRP 3.0.7 and try to get the physics to work.