-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a gesture interface #54
Merged
mkoval
merged 15 commits into
personalrobotics:master
from
rachelholladay:feature/demo_rogue
Oct 28, 2015
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2651bae
initial demo version
d1fb616
merging master into branch
5e62c5e
added init lines and real robot tweaks
1a681fc
wave gesture
189b5e1
more robust file finding
68d4c39
simple gesture control interface
1cda6d7
Merge branch 'master' into feature/demo_rogue
b12de45
merge new items from master
61c9212
removing high five
5278964
Gesture Code: Split up into helper functions, safer code with statesa…
76c3dc6
clean up of state saver and python consistency
e674055
rogue tests, import and string cleanup
cf4a6ad
convert to using util function for get manip idx
96f2a0e
in gestures, if no manip set active manip
0d1b0ae
adhering to testing convention
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<trajectory> | ||
<configuration> | ||
<group name="deltatime" offset="14" dof="1" interpolation=""/> | ||
<group name="joint_velocities herb 15 17 19 20 21 22 23" offset="7" dof="7" interpolation="linear"/> | ||
<group name="joint_values herb 15 17 19 20 21 22 23" offset="0" dof="7" interpolation="quadratic"/> | ||
</configuration> | ||
<data count="4"> | ||
5.03348748 -1.57569674 1.68788069 2.06769058 -1.66834313 1.536798209999999 0.2117534199999996 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 2.06769058 -1.66834313 1.536798209999999 0.2117534199999996 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 2.32312231 -1.66834313 1.53679821 0.2117534199999998 0 0 0 1.010805085068333 -8.786841625753019e-16 8.786841625753019e-16 8.786841625753019e-16 0.5054025425341667 5.03348748 -1.57569674 1.68788069 2.57855404 -1.66834313 1.53679821 0.21175342 0 0 0 0 0 0 0 0.5054025425341667 </data> | ||
<description><![CDATA[{"planning_method": "RetimeTrajectory", "planner": "HauserParabolicSmoother"}]]></description> | ||
</trajectory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<trajectory> | ||
<configuration> | ||
<group name="deltatime" offset="14" dof="1" interpolation=""/> | ||
<group name="joint_velocities herb 15 17 19 20 21 22 23" offset="7" dof="7" interpolation="linear"/> | ||
<group name="joint_values herb 15 17 19 20 21 22 23" offset="0" dof="7" interpolation="quadratic"/> | ||
</configuration> | ||
<data count="4"> | ||
5.03348748 -1.57569674 1.68788069 2.57855404 -1.66834313 1.53679821 0.2117534199999996 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 2.57855404 -1.66834313 1.53679821 0.2117534199999996 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 2.101471485 -1.66834313 1.53679821 0.2117534199999998 0 0 0 -1.38142325881679 -3.214722258480227e-16 3.214722258480227e-16 5.223923670030369e-16 0.6907116294083951 5.03348748 -1.57569674 1.68788069 1.62438893 -1.66834313 1.53679821 0.21175342 0 0 0 0 0 0 0 0.6907116294083951 </data> | ||
<description><![CDATA[{"planning_method": "RetimeTrajectory", "planner": "HauserParabolicSmoother"}]]></description> | ||
</trajectory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<trajectory> | ||
<configuration> | ||
<group name="deltatime" offset="14" dof="1" interpolation=""/> | ||
<group name="joint_velocities herb 15 17 19 20 21 22 23" offset="7" dof="7" interpolation="linear"/> | ||
<group name="joint_values herb 15 17 19 20 21 22 23" offset="0" dof="7" interpolation="quadratic"/> | ||
</configuration> | ||
<data count="4"> | ||
5.03348748 -1.57569674 1.68788069 1.62438893 -1.66834313 1.536798209999999 0.21175342 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 1.62438893 -1.66834313 1.536798209999999 0.21175342 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 2.101471485 -1.66834313 1.536798209999999 0.21175342 0 0 0 1.38142325881679 0 9.644166775440681e-16 -4.018402823100284e-17 0.6907116294083951 5.03348748 -1.57569674 1.68788069 2.57855404 -1.66834313 1.53679821 0.21175342 0 0 0 0 0 0 0 0.6907116294083951 </data> | ||
<description><![CDATA[{"planning_method": "RetimeTrajectory", "planner": "HauserParabolicSmoother"}]]></description> | ||
</trajectory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<trajectory> | ||
<configuration> | ||
<group name="deltatime" offset="14" dof="1" interpolation=""/> | ||
<group name="joint_velocities herb 15 17 19 20 21 22 23" offset="7" dof="7" interpolation="linear"/> | ||
<group name="joint_values herb 15 17 19 20 21 22 23" offset="0" dof="7" interpolation="quadratic"/> | ||
</configuration> | ||
<data count="4"> | ||
5.03348748 -1.57569674 1.68788069 2.57855404 -1.66834313 1.53679821 0.2117534199999996 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 2.57855404 -1.66834313 1.53679821 0.2117534199999996 0 0 0 0 0 0 0 0 5.03348748 -1.57569674 1.68788069 2.32312231 -1.66834313 1.53679821 0.2117534199999998 0 0 0 -1.010805085068333 -4.393420812876509e-16 4.393420812876509e-16 7.139308820924327e-16 0.5054025425341667 5.03348748 -1.57569674 1.68788069 2.06769058 -1.66834313 1.53679821 0.21175342 0 0 0 0 0 0 0 0.5054025425341667 </data> | ||
<description><![CDATA[{"planning_method": "RetimeTrajectory", "planner": "HauserParabolicSmoother"}]]></description> | ||
</trajectory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env python | ||
import herbpy | ||
import numpy | ||
|
||
if __name__ == '__main__': | ||
|
||
env, robot = herbpy.initialize() | ||
keep_going = True | ||
|
||
while keep_going: | ||
print "\n\nWelcome to the gesture control:\n \ | ||
Press W to wave.\n \ | ||
Press S to say something.\n \ | ||
Press Y to nod 'yes'.\n \ | ||
Press N to nod 'no'.\n \ | ||
Press H to high five.\n \ | ||
Press P to point at an object.\n \ | ||
Press S to present an object.\n \ | ||
Press R to reset the robot.\n \ | ||
Press Q to quit.\n" | ||
user_input = raw_input("Gesture? ") | ||
|
||
if user_input == 'Q': | ||
print 'Goodbye!\n' | ||
keep_going = False | ||
elif user_input == 'W': | ||
print 'Waving!\n' | ||
robot.Wave() | ||
elif user_input == 'Y': | ||
print 'Nodding yes!\n' | ||
robot.Nod(word='yes') | ||
elif user_input == 'N': | ||
print 'Nodding no\n!' | ||
robot.Nod(word='no') | ||
elif user_input == 'H': | ||
print 'High Fiving!\n' | ||
robot.HighFive() | ||
elif user_input == 'R': | ||
robot.right_arm.PlanToNamedConfiguration('relaxed_home', execute=True) | ||
robot.left_arm.PlanToNamedConfiguration('relaxed_home', execute=True) | ||
robot.right_hand.OpenHand() | ||
robot.left_hand.OpenHand() | ||
elif user_input == 'S': | ||
say_this = raw_input('What do you want HERB to say? ') | ||
robot.Say(str(say_this)) | ||
elif user_input == 'P': | ||
items = [x.GetName() for x in env.GetBodies()] | ||
print "HERB can see these things:" | ||
print items[1:] #Don't show the robot as an option | ||
point_at = raw_input('I want to point at item number: ') | ||
robot.Point(env.GetBodies()[int(point_at)]) | ||
elif user_input == 'S': | ||
items = [x.GetName() for x in env.GetBodies()] | ||
print "HERB can see these things:" | ||
print items[1:] | ||
point_at = raw_input('I want to point at item number: ') | ||
robot.Point(env.GetBodies()[int(point_at)]) | ||
else: | ||
print 'Input Not Recognized\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from grasping import PushGrasp, Grasp | ||
from rogue import * | ||
from blocks import GrabBlock |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import *
is evil. Could you explicitly list the functions you wish to import here?