Skip to content

Deploying the monarch_situational_awareness Package

jmessias edited this page Jun 29, 2015 · 1 revision

SAM is implemented as a catkin_package. A local instance of SAM can be executed as a single ROS Node, which instantiates an SA Manager, a Repository, and any desired slots. The sam_node executable and the sam.launch launch-file can be used for this purpose. To use it:

Clone the code to a catkin repository; Run catkin_make at the root of the repository and make sure that the package is in the ROS_PACKAGE_PATH (source the setup script “setup.bash” in the devel space);

Launch the sam.launch script in the monarch_situational_awareness package.

You can pass,as an additional argument to the launch file, the path of a YAML file that contains a description of the Slots that you wish to initialize the Repository with (use the “repo:=”) argument.

Once sam_node is running, you should see the following services in the local namespace (rosservice list): create_slot: This service accepts a message containing the fundamental Slot attributes described above (see monarch_situational_awareness/msg/SlotProperties.msg). It returns a success flag (true / false). See srv/CreateSlot.srv.

  • create_writer: This service accepts a WriterProperties message, which consists of a string containing the name of the Slot that the caller wishes to write to, along with an optional host name in case the user wants to access a particular member of a slot group (see monarch_situational_awareness/msg/WriterProperties.msg). The service returns the name of the topic where the writer should publish its data, and a success flag. See srv/CreateWriter.srv

  • create_reader: This service accepts a ReaderProperties message, which consists of a string containing the name of the Slot that the caller wishes to read from, along with a host name in case the user wants to access a particular member of a slot group (see monarch_situational_awareness/msg/ReaderProperties.msg). It returns the name of the topic that the caller should subscribe to, and a success flag. See srv/CreateReader.srv

  • list_slot_info: This service accepts an empty request (std_srvs/Empty.srv) and prints out all of the info of the associated Repository (in a YAML format as shown below). print_dep_graph: This service accepts an empty request (std_srvs/Empty.srv) and prints out the dependency graph of the SAR as a .gif file in the source of the catkin repository (“SAR_graph.gif”). For this to work, you should have package “pydot” installed in your system (try sudo apt-get install pydot).

  • print_dep_graph: This service accepts an empty request (std_srvs/Empty.srv) and prints out the dependency graph of the SAR as a .gif file in the source of the catkin repository (“SAR_graph.gif”). For this to work, you should have package “pydot” installed in your system (try sudo apt-get install pydot).