ARCHR (voodoo-style controller)

From Lofaro Lab Wiki
Revision as of 20:33, 16 December 2014 by Mjavid (Talk | contribs)

Jump to: navigation, search

Setting up the ARCHR system

1
Download the code from the Lofarolabs Github ARCHR Baxter branch here
Run the command from a terminal.
$ git clone https://github.com/LofaroLabs/Baxter


Fixing the file paths of the bash scripts

Controller
Navigate to the downloaded ARCHR folder, and open the startController bash script. Change the file path so it is correct.
For example: if your ubuntu username is "student" and the files are located under downloads, change the code on line 9 from:
 /home/archr/projects/Baxter/ARCHR/archr_team.jpg
to
 /home/student/Downloads/Baxter/ARCHR/archr_team.jpg
Change the path in line 11 too. For line 16, change only the username to student (/home/student/ros_ws)
Repeat this process for the controllerL, controllerR, gripperR and serverArms.sh bash files as well.
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.