Difference between revisions of "ARCHR (voodoo-style controller)"

From Lofaro Lab Wiki
Jump to: navigation, search
Line 13: Line 13:
 
$ gedit startController.sh
 
$ gedit startController.sh
 
</syntaxhighlight>
 
</syntaxhighlight>
* The lines you change will be line 9 and 11, so that if your ubuntu username is "student" and the files are located under downloads, it goes from
+
 
 +
* The lines to change will be line 9 and 11, so that if your ubuntu username is "student" and the files are located under downloads, it goes from
 
   <span style="color:#0000FF">/home/archr/projects/Baxter/ARCHR/archr_team.jpg</span>
 
   <span style="color:#0000FF">/home/archr/projects/Baxter/ARCHR/archr_team.jpg</span>
 
:to  
 
:to  

Revision as of 20:40, 16 December 2014

Set up the code

1: Download the code from the Lofarolabs Github ARCHR Baxter branch here by running this command from a terminal

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

2: Navigate to the location where the files were downloaded (the ARCHR folder) and edit the startController bash script using a text editor. Change the file path so that it reflects the current directory.

  • One way of doing this is:
$ cd /home/archr/projects/Baxter/ARCHR
$ gedit startController.sh
  • The lines to change will be line 9 and 11, so that if your ubuntu username is "student" and the files are located under downloads, it goes from
 /home/archr/projects/Baxter/ARCHR/archr_team.jpg
to
 /home/student/Downloads/Baxter/ARCHR/archr_team.jpg
  • For line 16, change only the username and the ros_ws attached to the end.
Repeat this process for the controllerL, controllerR, gripperR and serverArms.sh bash files as well, ensuring the username for the /ros_ws directory is correct.
Stereovision
Navigate to the Stereovision and change the file paths of the startReceive and startStream.sh files.
  • To setup the streaming webcams see [here]

Running the code

Gripper
The gripper code was only setup for the right gripper because our Baxter only had one gripper. This could be easily be run twice and a few words changed to work for both.
To run the gripper code first follow the readme from the Baxter/ARCHR code above. The controllerL, controllerR, gripperR and serverArms must be copied to the ros_ws folder in the home directory. Run the startcontroller script by the command: bash startController.sh and either follow the directions on screen or continue here.
Check the terminal with the LAN and dynamixel tabs and confirm that the dyanmixels in the scaled baxter arm have been detected and that an IP was configured for your LAN connection to Baxter.
Open the other window with the ros_ws workspace loaded and confirm that they are orange (ROS environment has been loaded for Baxter)
The controllers for each arm are seperate and must be run manually but in any order desired. Running the gripper first is recommended.
Next, run the gripperR.sh script in one of these windows. If your arms claw controls the baxter gripper then you have succeeded; otherwise a calibration may be needed. Run the Baxter gripper_keyboard example and calibrate the right gripper. Then repeat this gripper script.
Run the server.sh script. Then run the controllerR.sh and controller.sh. If you can control Baxter you have succeeded congrats! Otherwise ensure you have successfully connected to the dynamixels and to Baxter.
  • To test a connection to baxter just run an example program included with the SDK and determine you can control him.


Stereovision
Navigate to the Stereovision folder and run the startStream.sh and startReceive.sh files on the streaming and receiving computers.
The head should have already been linked via the startController.sh file in the above step. However if the script scanning for dynamixels determines that the oculus sdk has been opened and then suddenly closed, please reconnect the Oculus rift headset and confirm it is streaming pitch/yaw/roll data by running the test.py script located in the Baxter/ARCHR/scripts folder. If not further debugging is required out of the scope of this guide. See the setting up Oculus dependencies guide for assistance.