RCF Tutorial 1

Overview

This tutorial sets up a minimal controller and state machine. When run, the controller continuously moves the robot between two different points. This demonstrates bare minimum functionality, intended as a starting point for other tutorials or creating your own controller.

This example is composed of the component listed below:

  • sysController.xml

You must run the preparation steps for the tutorials before starting. Tutorial Prep

Remember to source SETUP.sh (Ubuntu) or runSETUP.bat (windows) before you start.

Run the Controller

To run the controller from an Actin package generated by the build system, enter the following commands in a terminal window:

  1. Copy UR5_sce.xml to your bin directory ( it's located at: $ACTIN_HOME/share/data/data/toolkits/actin/ur/UR5_sce.xml)

  2. Start the tutorial1 controller using rtSystemController

    cd {${ACTIN_HOME}/bin
    ./rtSystemControllerApp ../examples/controllerTutorials/tutorial1/controller/sysController.xml
  3. You'll see messages indicating the state machine is transitioning between state MS1 and state MS2, like this:

-- Thread ID = a95c
-- Thread Name =
-- Has steady clock =  True
-- Update period in Us = 10000
-- Priority = 30
-- Scheduler = n/a (Not supported)
-- CPU Affinity = 4095

[2020-04-16 12:48:41.118] [a95c] [INFO] State machine (path = /mc1) transits to: MS1
Starting MS1 script
Finished MS1 script
[2020-04-16 12:48:43.590] [a95c] [INFO] State machine (path = /mc1) transits to: MS2
Starting MS2 script
Finished MS2 script
[2020-04-16 12:48:45.320] [a95c] [INFO] State machine (path = /mc1) transits to: MS1
Starting MS1 script
Finished MS1 script
[2020-04-16 12:48:47.049] [a95c] [INFO] State machine (path = /mc1) transits to: MS2
Starting MS2 script
Finished MS2 script
[2020-04-16 12:48:48.779] [a95c] [INFO] State machine (path = /mc1) transits to: MS1
Starting MS1 script
Trouble Shooting

You might be warned about not setting the env variable EC_PRINT_LEVEL

    set EC_PRINT_LEVEL=INFO  

If the UR5_sce.xml file fails to load, you'll see something like below. Make sure you copied the .xml file to the actin bin folder. If you want to place it somwhere else you can edit the sysController.xml file.

EcInfo : Crash dumps will be saved to C:\Users\jeffs\AppData\Roaming\Energid\crashHandler
RT System Controller built on: Jan 14 2020 10:36:28
Loading controller description: ../examples/controllerTutorials/tutorial1/controller/sysController.xml
XML parser enables Stop_On_Error.
Controller description loaded.
[2020-04-16 12:42:33.470] [8780] [INFO] Logging service started:
Logging parameters
-- Console Stream:  key = "CONSOLE_STREAM", path = "/"
-- File Stream:     Not used
-- Log level:       [INFO]
-- EcPrint Level:   getenv("EC_PRINT_LEVEL") = INFO
EcInfo : License is valid and active for product ID 108
[2020-04-16 12:42:33.508] [8780] [INFO] Actin license is valid.
[2020-04-16 12:42:33.510] [8780] [INFO] Loading system control executive:
[2020-04-16 12:42:33.516] [8780] [FATAL] Failed to load system control executive!  <------------
EcError: Failed to initialize the system controller.