Difference between revisions of "Hubo DRC Peg-In-Hole & Valve Turn"

From Lofaro Lab Wiki
Jump to: navigation, search
Line 5: Line 5:
  
 
==Tutorials==
 
==Tutorials==
*[http://wiki.lofarolabs.com/index.php/Setting_up_computer_environment_for_controlling_Baxter Setting up the software environment for Baxter]
+
*[http://wiki.lofarolabs.com/index.php/Installing_openrave,_openhubo,_hubo-ach_and_performing_peg-in-hole Installing openRAVE, openHubo, and hubo-ach]
*[http://wiki.lofarolabs.com/index.php/%22Hello_World%22_with_Baxter Running the first script "Hello World" with Baxter]
+
  
 
==Code==
 
==Code==
;Setting up the code
+
===Running the code===
1:  
+
1: Get the code from the Lofarolabs Simulation/archr_drc
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
$ cd /
+
$ git clone https://github.com/LofaroLabs/Simulation
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
2: Follow these steps:
 +
<syntaxhighlight lang="bash">
 +
$ cd /etc/hubo-ach
 +
$ sudo gedit virtualHubo.py
 +
</syntaxhighlight>
 +
* Locate the following lines:
 +
<syntaxhighlight lang="bash">
 +
    if flag == 'nophysics':
 +
        options.physics=False
 +
        options.stop=False
 +
        openhubo.TIMESTEP=ha.HUBO_LOOP_PERIOD
 +
        print 'No Dynamics mode'
 +
    else:
 +
        options.physics=True
 +
        options.stop=True
  
 +
    #Enable simtime if required, or if force by physics
 +
    options.simtime = (simtimeFlag == 'simtime') or options.physics
 +
</syntaxhighlight>
 +
 +
* Add the following code directly under this last line:
 +
<syntaxhighlight lang="bash">
 +
    options.scenefile = ('/home/archr/projects/archr_Code/Simulation/archr_drc/openrave/peginhole.env.xml');
 +
</syntaxhighlight>
 +
** where 'archr/projects/archr_code/Simulation' is replaced with the directory where you saved the files.
 +
3: Navigate to the Simulation/archr_drc/openrave folder and fix the directory locations within the following files as well:
 +
** peginhole.env.xml
 +
* in the objects folder:
 +
** pegbox2.kinbody.xml
 +
4: Connect the physical controller to the PC and power it on.
 +
5: Run the openRAVE simulator with the command:
 +
<syntaxhighlight lang="bash">
 +
hubo-ach sim openhubo physics drc
 +
</syntaxhighlight>
  
;Running the code
+
* DRC is optional if you have the robot installed
1:
+
6: Run the archr_drc.py file in the archr_drc/openrave folder and scan for dynamixels. If you can move the robot on screen with moving the dynamixel arms you have succeeded.
 +
7: If the robot is in a stuck state from last time (or the simulator has frozen) try exiting the simulation (ctrl+z). Then run "hubo-ach killall" and wait a few seconds before starting it again.
  
 
==Videos==
 
==Videos==
Line 33: Line 66:
 
----
 
----
  
The Hubo-DRC successfully performs peg-in-hole via the ARCHR team's controller and instructions are located [http://wiki.lofarolabs.com/index.php/Installing_openrave,_openhubo,_hubo-ach_and_performing_peg-in-hole here]
+
The Hubo-DRC successfully performed peg-in-hole with our control structure and could not quite complete valve-turn, however a prototype environment is included within the code. It can be selected in the virtualHubo.py file and then updating the file directory locations of the valve environment & object files to your workstation appropriately.

Revision as of 01:40, 17 December 2014

DRCHuboARCHR.png

Overview

The ARCHR controller maintained accurate control of Baxters end effector within a sphere of 4cm. It was purchased by George Mason University in Spring 2014 and a major robot in the ARCHR project. Our project utilizes ROS and Baxter SDK scripts together with our stereovision system to offer an immersive controller. Its use could be extended in the future by adding realistic barrel vision, vibrational feedback, as well as implementing the Baxters features available from the sonar, IR, wrist-camera, and built-in front-facing camera. See rethink robotics webpage on Baxter and its various features here.

Tutorials

Code

Running the code

1: Get the code from the Lofarolabs Simulation/archr_drc

$ git clone https://github.com/LofaroLabs/Simulation

2: Follow these steps:

$ cd /etc/hubo-ach
$ sudo gedit virtualHubo.py
  • Locate the following lines:
    if flag == 'nophysics':
        options.physics=False
        options.stop=False
        openhubo.TIMESTEP=ha.HUBO_LOOP_PERIOD
        print 'No Dynamics mode'
    else:
        options.physics=True
        options.stop=True
 
    #Enable simtime if required, or if force by physics
    options.simtime = (simtimeFlag == 'simtime') or options.physics
  • Add the following code directly under this last line:
    options.scenefile = ('/home/archr/projects/archr_Code/Simulation/archr_drc/openrave/peginhole.env.xml');
    • where 'archr/projects/archr_code/Simulation' is replaced with the directory where you saved the files.

3: Navigate to the Simulation/archr_drc/openrave folder and fix the directory locations within the following files as well:

    • peginhole.env.xml
  • in the objects folder:
    • pegbox2.kinbody.xml

4: Connect the physical controller to the PC and power it on. 5: Run the openRAVE simulator with the command:

hubo-ach sim openhubo physics drc
  • DRC is optional if you have the robot installed

6: Run the archr_drc.py file in the archr_drc/openrave folder and scan for dynamixels. If you can move the robot on screen with moving the dynamixel arms you have succeeded. 7: If the robot is in a stuck state from last time (or the simulator has frozen) try exiting the simulation (ctrl+z). Then run "hubo-ach killall" and wait a few seconds before starting it again.

Videos

Video demonstration for the physical controller
Video demonstration for the keyboard controller

Valve-turn is in prototype stage, a sample environment is included in the link above. It can be selected by modifying the 'VirtualHubo.py' file located in the '/etc/hubo-ach' folder and selecting the line for valve-turn.

Building

  • N/A

The Hubo-DRC successfully performed peg-in-hole with our control structure and could not quite complete valve-turn, however a prototype environment is included within the code. It can be selected in the virtualHubo.py file and then updating the file directory locations of the valve environment & object files to your workstation appropriately.