Skip to content

Commit cf450e1

Browse files
committed
Update README.md
1 parent bb11755 commit cf450e1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/prpy/tsr/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A TSR is defined by three components:
1313

1414
The first three rows of Bw bound the allowable translation along the x,y and z axes (in meters). The last three rows bound the allowable rotation about those axes (in radians), all in w frame. Note that this asumed Roll-Pitch-Yaw (RPY) Euler angle convention.
1515

16-
### Example definition
16+
### Example: Defining a TSR
1717
Lets return to our previous example of selecting a pose for the end-effector to allow a manipulator to grasp a bottle. The following code shows the python commands that allow the TSR to be defined:
1818
```python
1919
ipython> bottle = env.GetKinBody('fuze')
@@ -29,4 +29,13 @@ ipython> robot.right_arm.SetActive() # We want to grasp with the right arm
2929
ipython> manip_idx = robot.GetActiveManipulatorIndex()
3030
ipython> grasp_tsr = prpy.tsr.TSR(T0_w = T0_w, Tw_e = Tw_e, Bw = Bw, manip = manip_idx)
3131
```
32-
32+
## Example: Using a TSR
33+
The following code shows an example of how to use a TSR to find a collision-free configuration for the manipulator that allows for a valid grasp:
34+
```python
35+
ipython> ee_sample = grasp_tsr.sample() # Compute a sample pose of the end-effector
36+
ipython> ik = robot.right_arm.FindIKSolution(ee_sample, openravepy.IkFilterOptions.CheckEnvCollisions)
37+
```
38+
```ik``` will now contain a configuration for the arm. This configuration could be given as a goal to a planner to move the robot into place for the grasp:
39+
```python
40+
ipython> robot.right_arm.PlanToConfiguration(ik, execute=True)
41+
```

0 commit comments

Comments
 (0)