Skip to content

Commit

Permalink
adding code from different repos
Browse files Browse the repository at this point in the history
  • Loading branch information
CS4752 committed Apr 19, 2015
1 parent 0b6ff1c commit ee1f6a0
Show file tree
Hide file tree
Showing 5 changed files with 573 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# baxter-teleoperation
Python code to teleoperate the Baxter industrial robot using Kinect, Oculus Rift, and a web interface.
## HRI DP2

This repository contains code for Human Robot Interaction Design Project Two,
by Patrick Steadman, Tauhidur Rahman, and Moumita Basuroychowdhury.

##### To start teleoperation using the simulator:

First, start the simulated baxter environment and enable the robot:

cd ~/ros_ws
. baxter.sh sim
roslaunch baxter_gazebo baxter_world.launch


Second, start the kinect client in a new terminal tab:

roslaunch openni_launch openni.launch

Third, start tracking in another termial tab:

roslaunch openni_tracker openni_tracker.launch

Finally, enable the robot andstart teleoperation.
The skeleton position tracking rate and the kinect
user number can be specified:

rosrun baxter_tools enable_robot.py -e
python teleoperate.py --user 1 --rate 10 --mirrored false

45 changes: 45 additions & 0 deletions demo_day_readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Need to run ./baxter.sh in each new shell
extract contents into ~/ros_ws/src/hri-dp2

New terminal

cd ~/ros_ws
./baxter.sh
roslaunch openni_launch openni.launch

New terminal

cd ~/ros_ws
./baxter.sh
roslaunch openni_tracker openni_tracker.launch

New terminal

cd ~/ros_ws
./baxter.sh
cd ~/ros_ws/src/hri-dp2
rosrun baxter_tools enable_robot.py -e
python teleoperate.py --user 1 --rate 10 --mirrored:=true

To get presentation remotes to work, plug them into another machine and run the key remap script. The keyboard remap remaps the .(period) key, making typing commands difficult, so execute the gripper control script first, escape, remap keys, then use the up arrow to execute the gripper script again.
Place the remap_keys.sh script in the ~/ros_ws folder on the new machine. This machine will have to be rebooted to undo the key remapping.

New terminal on new machine

cd ~/ros_ws/
./baxter.sh
rosrun baxter_examples gripper_keyboard.py
ctrl-c
bash remap_keys.sh
rosrun baxter_examples gripper_keyboard.py (via up arrow in terminal)

The top row corresponds to the right gripper and the bottom to the left (on both remotes).

laser_pointer (do not shine in observers' eyes)

right.close right.open

left.open left.close



268 changes: 268 additions & 0 deletions kinect.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /Grid1
- /Image1
- /Axes1
- /TF1
- /TF1/Status1
Splitter Ratio: 0.543624
Tree Height: 376
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.588679
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: Image
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.03
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Class: rviz/Image
Enabled: true
Image Topic: /camera/rgb/image_raw
Max Value: 1
Median window: 5
Min Value: 0
Name: Image
Normalize Range: true
Queue Size: 2
Transport Hint: raw
Value: true
- Class: rviz/Axes
Enabled: false
Length: 1
Name: Axes
Radius: 0.1
Reference Frame: <Fixed Frame>
Value: false
- Class: rviz/TF
Enabled: true
Frame Timeout: 15
Frames:
All Enabled: true
base:
Value: true
camera_depth_frame:
Value: true
camera_depth_optical_frame:
Value: true
camera_link:
Value: true
camera_rgb_frame:
Value: true
camera_rgb_optical_frame:
Value: true
collision_head_link_1:
Value: true
collision_head_link_2:
Value: true
display:
Value: true
dummyhead1:
Value: true
head:
Value: true
head_camera:
Value: true
left_arm_itb:
Value: true
left_arm_mount:
Value: true
left_finger:
Value: true
left_gripper:
Value: true
left_gripper_base:
Value: true
left_hand:
Value: true
left_hand_accelerometer:
Value: true
left_hand_camera:
Value: true
left_hand_camera_axis:
Value: true
left_hand_range:
Value: true
left_lower_elbow:
Value: true
left_lower_forearm:
Value: true
left_lower_shoulder:
Value: true
left_torso_itb:
Value: true
left_upper_elbow:
Value: true
left_upper_elbow_visual:
Value: true
left_upper_forearm:
Value: true
left_upper_forearm_visual:
Value: true
left_upper_shoulder:
Value: true
left_wrist:
Value: true
pedestal:
Value: true
right_arm_itb:
Value: true
right_arm_mount:
Value: true
right_finger:
Value: true
right_gripper:
Value: true
right_gripper_base:
Value: true
right_hand:
Value: true
right_hand_accelerometer:
Value: true
right_hand_camera:
Value: true
right_hand_camera_axis:
Value: true
right_hand_range:
Value: true
right_lower_elbow:
Value: true
right_lower_forearm:
Value: true
right_lower_shoulder:
Value: true
right_torso_itb:
Value: true
right_upper_elbow:
Value: true
right_upper_elbow_visual:
Value: true
right_upper_forearm:
Value: true
right_upper_forearm_visual:
Value: true
right_upper_shoulder:
Value: true
right_wrist:
Value: true
screen:
Value: true
sonar_ring:
Value: true
torso:
Value: true
world:
Value: true
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
camera_link:
camera_depth_frame:
camera_depth_optical_frame:
{}
camera_rgb_frame:
camera_rgb_optical_frame:
{}
Update Interval: 0
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: camera_link
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Topic: /initialpose
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 13.3547
Enable Stereo Rendering:
Stereo Eye Separation: 0.06
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: -0.958344
Y: -2.42494
Z: 2.06889
Name: Current View
Near Clip Distance: 0.01
Pitch: -0.0846014
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 0.780398
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 846
Hide Left Dock: false
Hide Right Dock: false
Image:
collapsed: false
QMainWindow State: 000000ff00000000fd00000004000000000000013c000002cbfc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002800000207000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d0061006700650100000235000000be0000001600ffffff000000010000010f000002cbfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730100000028000002cb000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000003efc0100000002fb0000000800540069006d00650100000000000004b0000001ee00fffffffb0000000800540069006d0065010000000000000450000000000000000000000259000002cb00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1200
X: 52
Y: 52
6 changes: 6 additions & 0 deletions remap_keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
xmodmap -e "keycode 60 = q"
xmodmap -e "keycode 112 = Q q"
xmodmap -e "keycode 117 = W w"
xmodmap -e "keycode 71 = w"
xmodmap -e "keycode 9 = w"

Loading

0 comments on commit ee1f6a0

Please sign in to comment.