Sarathi usage guide

Author: Sagar Behere [email protected]

Configuring Sarathi

When Sarathi starts, it reads some configuration files to set a number of parameters. The configuration files are located in $HOME/.config/Sarathi. The main configuration file is called Sarathi.conf and there is one configuration file for each plugin that Sarathi uses, named after the plugin. In case no configuration files exist, they are created when Sarathi starts and contain default values. Typically, these default values need to be modified to reflect the circumstances under which Sarathi is running. Example configuration files can be found in the folder config, under the Sarathi root directory.

Before you begin

Before you start Sarathi, it is necessary to start any other program Sarathi or its plugins depend on. A common example is to have a server running that does the actual robot control and Sarathi's robot plugin interacts with it. In this case, the server needs to be up and running before Sarathi is started.

Running Sarathi

Sarathi can be started without any arguments, in which case it binds to 127.0.1 at port 18000. Use the –help option to see how to change this. When Sarathi starts, it tries to start all its components. If a component cannot start for some reason (for example, if its initialization fails), then components depending on it will not be started. In the current implementation, the startup sequence is as follows

  1. The first component that is started is soapserver. If it cannot be started, Sarathi will not start.
  2. If soapserver starts successfully, the commandprocessor and planner components are started.
  3. Next, the robot component is started. If it starts, the sensor component is started and if that starts, the motioncontroller is started.

Sarathi writes a lot of information about what it is doing to a file named report, in the directory it is executing in. It is recommended to run tail -f report in a console when using Sarathi, since that will provide a lot of helpful information in case Sarathi isn't behaving as expected. When Sarathi starts, it provides you with a prompt where you can enter commands. Sometimes the prompt is obstructed by messages Sarathi displays. In this case, just press enter and you'll be able to see the prompt again. In the ideal case, you won't need to enter any commands. In case you do, the following is a small subsection of helpful commands:

  1. ls : gives you some information about the component you are in. (By default, this is the SOAPserver)
  2. isRunning : tells you if the component is currently running. This can also be inferred by the character in [] after the component name. [R] means running and [S] means stopped
  3. start : starts the component
  4. stop : stops the component
  5. cd ComponentName : leaves the current component and enters the component ComponentName
  6. cd .. : takes you back to the component you were in previously
  7. quit : exits sarathi, no matter which component you are in
  8. help : provides help

When it doesn't work

Sarathi is not perfect! If something doesn't work as expected,

  1. Take a look at the console where you are running tail -f report. See if any of the messages there make sense and if you can figure out what the problem is
  2. Verify that other software the Sarathi plugins depend on are working properly
  3. If the CommandProcessor gets stuck, you may get {}“Command processor is busy” messages repeatedly. In this case, at the Sarathi command prompt, type cd CommandProcessor, then stop and start. Make a note of the conditions that cause this problem and send me an email
  4. If the MotionController gets stuck, at the Sarathi command prompt, cd MotionController. Then stop and start. Again, make a careful note of the conditions that caused this problem and send me an email
  5. Sometimes, restarting Sarathi might not work immediately, because Sarathi won't be able to bind to the port again. In this case you need to wait for the operating system to free up the port. This can take atmost 2 minutes on a Linux system.
  6. In the worst case, quit Sarathi and start over again