Only released in EOL distros:  

cn-alica-ros-pkg: AlicaClient | AlicaEngine | Planmodeller | alica_turtle

Package Summary

alica_turtle

cn-alica-ros-pkg: AlicaClient | AlicaEngine | Planmodeller | alica_turtle

Package Summary

alica_turtle

alica_turtle demonstrates how to use Alica. It defines the behaviour of some turtles based on turtlesim.

Setup

The package can be started in the following way:

  • Set the environment variable ES_ROOT point to the folder that contains the alica stack. I.e., to the one that contains cn-alica-ros-pkg.
  • Include ES_ROOT/lib into your MONO_PATH
  • Copy alica_turtle/etc to ES_ROOT/etc. This folder contains example configuration files.
  • Build alica_turtle:

rosmake alica_turtle
  • Start a roscore.
  • Start a turtlesim

rosrun turtlesim turtlesim_node
  • Start some turtles

ROBOT=turtle1 rosrun alica_turtle AlicaTurtle.exe -m Example
ROBOT=turtle2 rosrun alica_turtle AlicaTurtle.exe -m Example
ROBOT=turtle3 rosrun alica_turtle AlicaTurtle.exe -m Example
...
  • You can start the AlicaClient to monitor the internal state of the turtles:

rosrun AlicaClient AlicaClient.exe
  • Hover over a plan in the client to see the current values for constrained variables.

Package Layout

The source code is divided into the following parts:

  • src/AlicaTurtle.cs - a simple main program.
  • src/WorldModel - a trivial representation of each turtles beliefs.
  • src/Behaviours - the set of actions or behaviours each turtle can execute. It demonstrates a service call, message sending, as well as constraint solving.
  • src/Expressions - all files generated by the Planmodeller, each condition and constraint must be filled by hand. Have a look at src/Expressions/constraint/PositionConstraints.cs for an exemplary constraint.

The folders plans, roles, and Misc contain the ALICA XML-descriptions of the program. Each of these correspond to a project in the Planmodeller.

Notes

  • The configuration file Globals.conf defines all turtles that may exist. Therefore, if you want to start more than 7, you need to edit this file and add additional turtles.
  • The configuration file Alica.conf defines important parameters such as excution intervals and solving time. Depending on the number of turtles you want to simulate per computer, you might want to adjust these values. Currently, they are set for near real-time execution.
  • ES_ROOT can be set to any path. In this case, edit Alica.conf and modify the relative paths to the behaviour and expression libraries. Note that modifying ES_ROOT will cause rosmake to compile all assemblies again, unless they are copied to ES_ROOT/lib

Wiki: alica_turtle (last edited 2012-05-17 16:04:28 by HendrikSkubch)