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

From Lofaro Lab Wiki
Jump to: navigation, search
Line 43: Line 43:
 
* For more help read the code comments and documentation or check Rethinks website for Baxter code help or email [mannanjavid@gmail.com mannan].
 
* For more help read the code comments and documentation or check Rethinks website for Baxter code help or email [mannanjavid@gmail.com mannan].
 
3: Finally you are ready to control Baxter with the controller! In the second terminal that opened, shown below, run the server, arm and gripper bash scripts (run the server before the arm).  
 
3: Finally you are ready to control Baxter with the controller! In the second terminal that opened, shown below, run the server, arm and gripper bash scripts (run the server before the arm).  
[File:Terminal1_networkandandach.png]
+
[[File:Terminal1_controllerserver.png]]
 +
 
 
* Note 1: The ros_ws workspace must have loaded and show in an orange color (ROS environment has been loaded for Baxter)
 
* Note 1: The ros_ws workspace must have loaded and show in an orange color (ROS environment has been loaded for Baxter)
 
* Note 2: The server must be run first. The controllers for each arm are seperate and must be run manually but in any order desired. Running the gripper last is recommended.
 
* Note 2: The server must be run first. The controllers for each arm are seperate and must be run manually but in any order desired. Running the gripper last is recommended.

Revision as of 21:24, 16 December 2014

BaxterARCHR.png

Setting 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
 /home/archr/projects/Baxter/ARCHR/archr_team.jpg

becomes

 /home/student/Downloads/Baxter/ARCHR/archr_team.jpg
  • For line 16, make sure to only change the username and keep the ros_ws attached to the end.

3: Repeat this process for the controllerL, controllerR, gripperR and serverArms.sh bash files as well.

4: For the stereovision code, set the streaming IP to your current IP in the left.py and right.py files.

  • Also Navigate to the Stereovision folder within the base ARCHR folder, and change the file paths in the startReceive and startStream.sh files similar to steps 1-3 above.
Running the code

1: Connect a LAN cable from Baxter to your computer, and Disable Networking in Ubuntu as shown in the picture below. Disable networking ubuntu12.04.png

2: Run the startController bash script by the command:

$ bash startController.sh
  • You should noticed two new terminals have opened. These will be where you check the connection with the physical controller of dynamixels and will also run the actual controlling scripts.
  • In the terminal with 4 tabs open, as shown below, you should see the first read "Firewall stopped...", the second read "Successfully claimed IP..." (for the last line), the third read "Waiting to hear from hubo-daemon... Ready!" and ">> hubo-ach:" (last two lines), and the final terminal confirm connection with the dynamixels.

Terminal1 networkandandach.png

  • For successfully communicating with Baxter the first two terminal tabs should read that the firewall has been disabled and second that an IP that can communicate with Baxter through LAN has been assigned. (This could be different for you if you are communicating over wireless). The third tab should indicate the joint-streaming interface (hubo-ach) has started, and the last tab that the dynamixel servos making the physical arm that will control Baxter have been detected. If this is not the case for any of these tabs, please close all terminals and restart the script (or individually rerun the step that failed).
  • For more help read the code comments and documentation or check Rethinks website for Baxter code help or email [mannanjavid@gmail.com mannan].

3: Finally you are ready to control Baxter with the controller! In the second terminal that opened, shown below, run the server, arm and gripper bash scripts (run the server before the arm). Terminal1 controllerserver.png

  • Note 1: The ros_ws workspace must have loaded and show in an orange color (ROS environment has been loaded for Baxter)
  • Note 2: The server must be run first. The controllers for each arm are seperate and must be run manually but in any order desired. Running the gripper last is recommended.
  • Note 3: for the gripper, a calibration is required manually upon every boot of Baxter before using the gripper. Run the Baxter gripper_keyboard example located within the ros_ws/src/baxter_examples/scripts directory and then type the key to calibrate the appropriate gripper.


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.