Difference between revisions of "Installing openrave, openhubo, hubo-ach and performing peg-in-hole"

From Lofaro Lab Wiki
Jump to: navigation, search
(Created page with "1. Install openRAVE version 0.9.0 from [http://openrave.org/en/coreapihtml/installation_linux.html here] (compile it from sources) 2. Install openHubo from [https://github.co...")
 
 
(11 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
3. Install Hubo-ach from [https://github.com/hubo/hubo-ach here]
 
3. Install Hubo-ach from [https://github.com/hubo/hubo-ach here]
  
4. Download the github code for the ARCHR peg-in-hole from [https://github.com/LofaroLabs/Simulation/tree/master/archr_drc here], and save the entire contents in a folder called 'Hubo_Simulation'
+
4. Navigate to the hubo-ach folder
 +
<syntaxhighlight lang="bash">
 +
$ cd /etc/hubo-ach
 +
</syntaxhighlight>
  
5. Run openrave with hubo-ach with the command: hubo-ach sim openhubo physics drc
+
5. Edit the virtualHubo.py file
 +
<syntaxhighlight lang="bash">
 +
$ sudo gedit virtualHubo.py
 +
</syntaxhighlight>
  
6. Run the python keyboard example 'HuboKeyboardControl.py' and press the appropriate keyboard key for performing manipulations on the various limbs of DRC. For example, pressing 'a' moves the RSP up 0.1 radians, 'z' moves it down 0.1 radians.
+
6. Change the following lines starting at line 296 to
 +
<syntaxhighlight lang="bash">
 +
        ...
 +
    if oh_version=='0.8.0':
 +
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options)
 +
    elif oh_version=='0.7.0':
 +
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
 +
    else:
 +
        [robot,ctrl,ind,ghost,recorder]=openhubo.load(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
 +
        ... 
 +
To:
 +
        ...
 +
    if oh_version=='0.8.0':
 +
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options)
 +
    elif oh_version=='0.7.0':
 +
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
 +
    else:
 +
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
 +
        ...    
 +
</syntaxhighlight>
  
All joints and keys are shown below:
+
4. Run the hubo-ach simulator to test it
    if c == 'a':
+
        RSP = RSP-0.1;
+
        if c == 'z':
+
          RSP = RSP+0.1;
+
    if c == 's':
+
        RSR = RSR-0.1;
+
        if c == 'x':
+
          RSR = RSR+0.1;
+
    if c == 'd':
+
        RSY = RSY-0.1;
+
        if c == 'c':
+
          RSY = RSY+0.1;
+
    if c == 'f':
+
        REB = REB-0.1;
+
        if c == 'v':
+
          REB = REB+0.1;
+
    if c == 'g':
+
        RWY = RWY-0.1;
+
        if c == 'b':
+
          RWY = RWY+0.1;
+
    #if c == 'h':
+
        RWP = RWP-0.1;
+
        #if c == 'n':
+
          RWP = RWP+0.1;
+
        if c == 'w':
+
          RF1 = 1;
+
        if c == 'e':
+
          RF1 = -1;
+
        if c == 'r':
+
          RF2 = 1;
+
        if c == 't':
+
          RF2 = -1;
+
  
note: RF1 and RF2 require a value of 1 or -1 to open or close the two portions of the hand.
+
<syntaxhighlight lang="bash">
 +
$ hubo-ach sim openhubo nophysics
 +
</syntaxhighlight>
 +
 
 +
5. Instructions for running the ARCHR code can be found [http://wiki.lofarolabs.com/index.php/Hubo_DRC_Peg-In-Hole_%26_Valve_Turn here]

Latest revision as of 02:04, 17 December 2014

1. Install openRAVE version 0.9.0 from here (compile it from sources)

2. Install openHubo from here

3. Install Hubo-ach from here

4. Navigate to the hubo-ach folder

$ cd /etc/hubo-ach

5. Edit the virtualHubo.py file

$ sudo gedit virtualHubo.py

6. Change the following lines starting at line 296 to

        ...
    if oh_version=='0.8.0':
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options)
    elif oh_version=='0.7.0':
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
    else:
        [robot,ctrl,ind,ghost,recorder]=openhubo.load(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
        ...   
To:
        ...
    if oh_version=='0.8.0':
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options)
    elif oh_version=='0.7.0':
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
    else:
        [robot,ctrl,ind,ghost,recorder]=openhubo.load_scene(env,options.robotfile,options.scenefile,options.stop, options.physics, options.ghost)
        ...

4. Run the hubo-ach simulator to test it

$ hubo-ach sim openhubo nophysics

5. Instructions for running the ARCHR code can be found here