home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 470 / rccl018 < prev    next >
Text File  |  1987-03-02  |  9KB  |  283 lines

  1. .ND
  2. .EQ
  3. delim $$
  4. .EN
  5. .NH 1
  6. Introduction
  7. .PP
  8. This manual describes
  9. the first version of the RCCL robot programming system.
  10. The reader is assumed to be familiar with the C programming language [1],
  11. and with the UNIX operating system.
  12. A thorough understanding of the control and programming techniques
  13. described by Paul in [2]
  14. is highly recommended if not mandatory.
  15. The design philosophy of RCCL is described in [3].
  16. .NH 1
  17. Overview
  18. .PP
  19. Using RCCL requires the user to be aware of the
  20. hardware and software components.
  21. The hardware involves a VAX computer operated under UNIX.
  22. A special high speed input-output interface [4] installed on the
  23. VAX Unibus extension establishes the communication with a
  24. Unimate robot controller [5].
  25. The controller's hardware consists of an LSI1-11 microprocessor and several
  26. interfaces mounted on a Qbus (serial, parallel, adc/dac, and
  27. host machine interfaces).
  28. The LSI-11 microprocessor controls
  29. six 6503 joint processors via a special parallel
  30. interface.
  31. The joint processors control the manipulator's joints via
  32. digital and analog circuitry.
  33. .PP
  34. Software components can be listed in terms of levels.
  35. Starting at the lowest level, we find the
  36. .I servo
  37. code running in each joint
  38. processor.
  39. A
  40. .I superviser
  41. program,
  42. loaded in the LSI11 is driven by a hardware clock
  43. interrupt.
  44. Each time sample, the
  45. .I superviser
  46. program gathers data from the manipulator state : joint
  47. positions and torques, front panel switch register content, analog
  48. conversion readings, interrupts the VAX and transmits the data.
  49. It then enters a wait state until the VAX sends back low level commands that
  50. are transmitted to the joint processors.
  51. Interrupts are handled in the VAX by mean of a specialized
  52. .I
  53. device driver.
  54. .R
  55. Each time an interrupt occurs in the VAX,
  56. the manipulator state is monitored by a
  57. .I
  58. real time robot interface
  59. .R
  60. that checks for limit conditions.
  61. Error conditions are excessive joint rates or motor currents.
  62. The manipulator's state data is stored in a C structure available as a global
  63. variable [6].
  64. The
  65. .I
  66. real time interface,
  67. .R
  68. after receiving the manipulator's
  69. state information, calls a initial user's function,
  70. examines the content of a second global C structure describing all the
  71. possible command combinations.
  72. It checks for validity, translates the requests into low level commands
  73. and transmit them to the robot controller.
  74. A second user function is then called and can run for the remainder of the
  75. sample period.
  76. The
  77. .I
  78. real time interface
  79. .R
  80. serves the purpose of a robot controller user's interface and its
  81. functions and operation
  82. are described in [6].
  83. .PP
  84. The
  85. .I setpoint
  86. process, or trajectory generator is part of RCCL, and uses the
  87. .I
  88. real time interface
  89. .R
  90. to control the manipulator and obtain the manipulator's state.
  91. The
  92. .I setpoint
  93. process is interrupt driven and acts according to asynchronous motion
  94. requests specified in the user's program via RCCL primitives.
  95. .bp
  96. .NH
  97. Tutorial Introduction
  98. .PP
  99. The first program we shall introduce,
  100. uses a reference coordinate frame located at the base of the
  101. manipulator whose shoulder is at 864 mm above the base.
  102. The transform $T6$ describes the position of a frame attached to
  103. the last link of the robot originated at the point of meeting of
  104. the axes of the last three joints, with respect to the shoulder.
  105. We want to move the manipulator at a position located at
  106. 600 mm in the X direction, 100 mm in the Y direction, and 800 mm
  107. in the Z direction with respect to the reference coordinate frame.
  108. We also want that the last link points downward.
  109. The program may look like:
  110. .br
  111. .cs R 23
  112. .DS L
  113. #include "rccl.h"
  114.  
  115. pumatask()
  116. {
  117.         TRSF_PTR t, b;
  118.         POS_PTR  p0;
  119.  
  120.         t = gentr_trsl("T",  0.,  0., 864.);
  121.         b = gentr_rot("B", 600. , 100., 800., yunit, 180.);
  122.  
  123.         p0 = makeposition("P0", t, t6, EQ, b, TL, t6);
  124.  
  125.         move(p0);
  126.         move(park);
  127. }
  128. .DE
  129. .cs R
  130. .PP
  131. The file
  132. .B rccl.h
  133. contains C structure type definitions and external
  134. entry points the same way the system file ``stdio.h'' does.
  135. It gives access to what users programs may need in order to
  136. use RCCL functions, structures, and variables.
  137. .PP
  138. The variable declarations include the predeclared types
  139. TRSF_PTR, a pointer to a transformation
  140. structure, and POS_PTR, a pointer to a position structure.
  141. The system builds the transformations matrices needed to describe
  142. the task via the
  143. .B gen_trsl
  144. and
  145. .B gen_rot
  146. functions.
  147. The reference coordinate is called ``T'' and is set as a pure translation.
  148. As for all the RCCL functions that dynamically
  149. allocate memory space, the first
  150. argument is a string of characters naming the created object.
  151. This name is purely arbitrary and can be set to the empty string ("").
  152. However, giving meaningful names is a good idea because
  153. RCCL uses them in many occasions to print informative messages.
  154. The remaining arguments of the
  155. .I gentr_trsl()
  156. function are the X, Y, and Z values of the $p$ (position)
  157. vector of the transform.
  158. The rotational part is automatically set to the $unit$ rotation.
  159. The function
  160. .I gentr_rot()
  161. allocates memory and sets the positional part and the rotational part
  162. of the ``B'' transform.
  163. Arguments 1, 2, 3, and 4 have the same meaning as for
  164. .I gentr_trsl().
  165. Among several possible ways to specify rotations, we use here
  166. a rotation around a vector.
  167. The variable `yunit', which is of the type VECT_PTR, is a pointer
  168. to a vector.
  169. This variable is provided by RCCL as a pointer to
  170. a vector whose value is {0., 1., 0.}.
  171. .FS
  172. RCCL is systematically coded according to the conventions of the
  173. C language Version 6.
  174. Recent versions of C allow the passing by value of
  175. structures as function arguments.
  176. Although one may use these features in the programs, none of the
  177. RCCL functions make use of them and structure arguments are
  178. always  passed by address.
  179. .FE
  180. The rotational part of the ``B'' transform is set to a 180 degrees rotation
  181. around the Y unit vector.
  182. (The fact that the Z direction of the $T6$ transform is pointing in
  183. direction of the last link of the manipulator must be kept in mind).
  184. The Z axis of the ``B'' transform is now pointing downward, because
  185. ``B'' is described with respect to ``T'' whose Z direction points upward.
  186. .PP
  187. It is now time to set up a position equation using a call to
  188. .I makeposition.
  189. .I Makeposition
  190. returns a pointer to a ring data structure that is used by the
  191. .I move
  192. primitive.
  193. It accepts a variable number of arguments.
  194. The first one is the name of the position.
  195. Up to the `EQ' constant, the list of arguments make up
  196. the left hand side of the position equation.
  197. Then comes the list of transforms making up the right hand side.
  198. The constant `TL' introduces the transform that we choose to be
  199. the
  200. .I tool
  201. transform.
  202. The
  203. .I tool
  204. transform can be any of the frames contained in the equation, provided
  205. that it gives meaningful results, more on that later.
  206. For now, we can say that most of the
  207. time, $T6$ or one of the frames described with respect to $T6$ in the
  208. left hand side of the equation will be chosen.
  209. We obtain the following equation :
  210. .EQ
  211. T~T6~=~B
  212. .EN
  213. .PP
  214. The first
  215. .I move
  216. request causes the manipulator to move such that the position equation
  217. is satisfied.
  218. In practice the robot will not exactly reach ``P0'', but
  219. will perform a transition close to it before going back to ``PARK''.
  220. The `park' position pointer is build into the system.
  221. .PP
  222. Before proceeding further, we shall add two modifications to
  223. this first example. We replace:
  224. .br
  225. .cs R 23
  226. .DS L
  227.         move(p0);
  228.         move(park);
  229. .DE
  230. .cs R
  231. by:
  232. .br
  233. .cs R 23
  234. .DS L
  235.         setmod('c');
  236.         move(p0);
  237.         stop(0);
  238.         move(park);
  239. .DE
  240. .cs R
  241. .PP
  242. By default, RCCL tasks start in
  243. .I joint
  244. mode.
  245. By calling
  246. .I setmod()
  247. we ask for the moves to be performed in
  248. .I Cartesian
  249. mode, the
  250. .I tool
  251. frame, here $T6$, move along a line joining the ``PARK'' position
  252. and the ``P0'' position.
  253. The
  254. .I stop
  255. statement causes the manipulator to stop during a null time at ``P0'',
  256. that is to say, to bring the velocity to zero.
  257. In other words, it will actually reach the position ``P0''.
  258. The $T6$ transform, during the travel to ``P0'', will be evaluated
  259. at sample time intervals as:
  260. .EQ
  261. T6~=~T sup -1~B~DRIVE
  262. .EN
  263. The purpose of the $DRIVE$ transform is to produce a straight path
  264. motion [2].
  265. Most of the time, the position equation will include one or
  266. several transforms to describe the end effector.
  267. This can be achieved by creating one more transform and adding
  268. one argument to the position equation.
  269. .br
  270. .cs R 23
  271. .DS L
  272.         e = gentr_trsl("E", 0., 0., 170.);
  273.  
  274.         p0 = makeposition("P0", t, t6, e, EQ, b, TL, e);
  275. .DE
  276. .cs R
  277. Now the location described by the transformation ``E'' with respect to $T6$
  278. will travel along
  279. a straight Cartesian path and $T6$ will be evaluated as :
  280. .EQ
  281. T6~=~T sup -1~B~DRIVE~E sup -1
  282. .EN
  283.