Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
128 additions
and
17 deletions.
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
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
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
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
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
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
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
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
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
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
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,32 @@ | ||
# | ||
# Defines states for SweetMove testing | ||
# | ||
|
||
import man.motion.SweetMoves as SweetMoves | ||
|
||
def gameInitial(player): | ||
player.gainsOn() | ||
return player.stay() | ||
|
||
def gameReady(player): | ||
return player.goLater('doMove') | ||
def gameSet(player): | ||
return player.goLater('doMove') | ||
def gamePlaying(player): | ||
return player.goLater('doMove') | ||
def gamePenalized(player): | ||
return player.goLater('doMove') | ||
|
||
def doMove(player): | ||
if player.firstFrame(): | ||
player.gainsOn() | ||
player.executeMove(SweetMoves.ZERO_POS) | ||
|
||
if player.counter == 1: | ||
return player.goLater('done') | ||
return player.stay() | ||
|
||
def done(player): | ||
if player.firstFrame(): | ||
return player.stay() | ||
return player.stay() |
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,15 @@ | ||
# | ||
# A behavior to test SweetMoves. | ||
# | ||
|
||
from . import SoccerFSA | ||
from . import SweetStates | ||
|
||
class SoccerPlayer(SoccerFSA.SoccerFSA): | ||
def __init__(self, brain): | ||
SoccerFSA.SoccerFSA.__init__(self,brain) | ||
self.addStates(SweetStates) | ||
self.setName('pSweet') | ||
# No fall protection when testing sweetMoves | ||
brain.roboguardian.enableFallProtection(False) | ||
|
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,39 @@ | ||
#!/bin/sh | ||
############################################################################### | ||
# This script will setup auto-login into a remote machine. Specifically, | ||
# this is is useful for seting up auto-login for the Naos. | ||
# Instructions filtched from http://linuxproblem.org/art_9.html | ||
# | ||
# NOTE: If you run this script twice on the same robot, your hostname will | ||
# appear twice in .ssh/authorized_keys. Login will still work, but you will | ||
# bloat the file | ||
# | ||
# jstrom, June 2008 | ||
# | ||
############################################################################## | ||
|
||
REMOTE_USERNAME=root | ||
SSH=~/.ssh | ||
ID_RSA_FILE=$SSH/id_rsa | ||
RSA_PUBLIC_KEY_FILE=$SSH/id_rsa.pub | ||
|
||
if [ "$1" == "" ]; then | ||
echo "Usage: ./setup-autologin <robot-ip>" | ||
exit 1 | ||
fi | ||
|
||
echo "Configuring auto login. Only run this once per robot " | ||
|
||
|
||
if [ ! -e $RSA_PUBLIC_KEY_FILE ] || [ ! -e $ID_RSA_FILE ]; then | ||
echo "Generating a public key" | ||
ssh-keygen -t rsa -N "" -f $ID_RSA_FILE | ||
else | ||
echo "Detected an exisiting public key, so won't generate a new one" | ||
fi | ||
|
||
echo "Configuring remote robot with your public key." | ||
echo "Please enter the password for the robot when promted:" | ||
cat $RSA_PUBLIC_KEY_FILE | ssh $REMOTE_USERNAME@$1 'mkdir -p .ssh && cat >> .ssh/authorized_keys' | ||
|
||
echo "setup complete" |
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