VI.8 Robot Control System

Robot Control System: Intro [Slide 223]

Wikipedia

A tele-operated robot is a tracked device with vehicle schematic as shown in the following figure.

Robot Control System: ITL [Slide 227]

Robot Control System: Tempura [Slide 232]

/ 
  tempura code for robot control system 
  OCS : operator control system 
  ICS : infrared control system 
  MCS : motor control system 
 / 
 
define move(X,Y) = { 
  format("sending left %t  right %t \n", X, Y) 
}. 
 
define s = 0. 
define f = 20. 
define b = -20. 
define mvl = [b,s,b,s,f,f,f,b]. 
define mvr = [b,b,f,f,f,s,b,s]. 
 
/ run / define robot() = { 
  exists  Loc, Roc, Lic, Ric, Opactive, Iractive, Ircounts  : 
    { list(Ircounts,8) and stable(struct(Ircounts)) and
 define OCS() = { 
   while true do { 
     len(1) and 
     input Loc and input Roc and 
     Opactive = {if (Loc ~= 0) or (Roc ~= 0) then 1 else 0} 
   } 
 } and 
 
define sum(X) = { 
  {if Ircounts[0]>100 then X[0] else 0} + 
  {if Ircounts[1]>100 then X[1] else 0} + 
  {if Ircounts[2]>100 then X[2] else 0} + 
  {if Ircounts[3]>100 then X[3] else 0} + 
  {if Ircounts[4]>100 then X[4] else 0} + 
  {if Ircounts[5]>100 then X[5] else 0} + 
  {if Ircounts[6]>100 then X[6] else 0} + 
  {if Ircounts[7]>100 then X[7] else 0} 
 } and
define ICS() = { 
  while true do { 
    len(1) and input Ircounts and 
    Iractive = {if (exists i < 8 : Ircounts[i]>100) then 1 else 0} 
    and Lic = sum(mvl) and Ric = sum(mvr) 
  } 
 } and 
 
define MCS() = { 
   while true do { 
    len(1) and 
    if Opactive=1 and Iractive=0 then { 
      format("operator move \n") and move(Loc,Roc) } 
    else { 
      if Iractive=1 then { 
        format("infrared move \n") and move(Lic,Ric) } 
      } 
  } 
 } and
 MCS() and ICS() and OCS() 
 } 
}.

2023-09-12
Contact | Home | ITL home | Course | Proofs | Algebra | FL
© 1996-2023