Difference between revisions of "Hubo DRC Peg-In-Hole & Valve Turn"
(→Videos) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
== Overview == | == Overview == | ||
− | The ARCHR controller maintained accurate control of | + | The ARCHR controller was able to perform peg-in-hole and maintained accurate control of the end effectors. A stereovision system could not be implemented in openrave due to constraints with instantiating a camera in openrave within a virtual machine. A stereovision system would have offered an immersive controller and could be implemented in the future on a hard install of Linux, or using Gazebo. Source code for operating our controller in Gazebo is included in the gazebo directory of the archr_drc github folder, but not explained in this article and left for you to explore. |
==Tutorials== | ==Tutorials== | ||
− | + | 1: [http://wiki.lofarolabs.com/index.php/Installing_openrave,_openhubo,_hubo-ach_and_performing_peg-in-hole Installing openRAVE, openHubo, and hubo-ach] | |
==Code== | ==Code== | ||
Line 18: | Line 18: | ||
$ sudo gedit virtualHubo.py | $ sudo gedit virtualHubo.py | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | 3: Locate the following lines: | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
if flag == 'nophysics': | if flag == 'nophysics': | ||
Line 33: | Line 33: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | 4: Add the following code directly under this last line: | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
options.scenefile = ('/home/archr/projects/archr_Code/Simulation/archr_drc/openrave/peginhole.env.xml'); | options.scenefile = ('/home/archr/projects/archr_Code/Simulation/archr_drc/openrave/peginhole.env.xml'); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
** where 'archr/projects/archr_code/Simulation' is replaced with the directory where you saved the files. | ** where 'archr/projects/archr_code/Simulation' is replaced with the directory where you saved the files. | ||
− | + | 5: Navigate to the Simulation/archr_drc/openrave folder and fix the directory locations within the following files as well: | |
** peginhole.env.xml | ** peginhole.env.xml | ||
* in the objects folder: | * in the objects folder: | ||
** pegbox2.kinbody.xml | ** pegbox2.kinbody.xml | ||
− | + | 6: Connect the physical controller to the PC and power it on. | |
− | + | 7: Run the openRAVE simulator with the command: | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
hubo-ach sim openhubo physics drc | hubo-ach sim openhubo physics drc | ||
Line 49: | Line 49: | ||
* DRC is optional if you have the robot installed | * DRC is optional if you have the robot installed | ||
− | + | 8: 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. | |
− | + | 9: 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== | ||
− | : [https://www.youtube.com/watch?v=sSjuIeD9I-o Video demonstration] for the physical controller | + | : [https://www.youtube.com/watch?v=sSjuIeD9I-o Video demonstration] for the physical controller (the archr_drc.py script) |
− | : [https://www.youtube.com/watch?v=4qXgPeQS--w&list=UU1bXijFzURTJU3T0gwT8egg Video demonstration] for the keyboard controller | + | : [https://www.youtube.com/watch?v=4qXgPeQS--w&list=UU1bXijFzURTJU3T0gwT8egg Video demonstration] for the keyboard controller (HuboKeyboardControl.py) |
<html> | <html> | ||
<iframe width="560" height="315" src="//www.youtube.com/embed/sSjuIeD9I-o" frameborder="0" allowfullscreen></iframe> | <iframe width="560" height="315" src="//www.youtube.com/embed/sSjuIeD9I-o" frameborder="0" allowfullscreen></iframe> |
Latest revision as of 01:46, 17 December 2014
Overview
The ARCHR controller was able to perform peg-in-hole and maintained accurate control of the end effectors. A stereovision system could not be implemented in openrave due to constraints with instantiating a camera in openrave within a virtual machine. A stereovision system would have offered an immersive controller and could be implemented in the future on a hard install of Linux, or using Gazebo. Source code for operating our controller in Gazebo is included in the gazebo directory of the archr_drc github folder, but not explained in this article and left for you to explore.
Tutorials
1: Installing openRAVE, openHubo, and hubo-ach
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
3: 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
4: 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.
5: 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
6: Connect the physical controller to the PC and power it on. 7: Run the openRAVE simulator with the command:
hubo-ach sim openhubo physics drc
- DRC is optional if you have the robot installed
8: 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. 9: 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 (the archr_drc.py script)
- Video demonstration for the keyboard controller (HuboKeyboardControl.py)
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.