Skip to content

Troubleshooting guide

athanasios-riact edited this page Oct 19, 2020 · 1 revision

Troubleshooting guide for Skiros2

The following guide presents a few common problems a new user will probably run into when using Skiros2, as well as its solutions:

Not being able to see the list of skills when launching the Skiros GUI

There are two reasons which might cause this error. First of all, check the launch file (.launch). The first line should include all the skills (skill_list) that you have created. It should look like this:

<launch>
  <arg name="skill_list" default="[spawn_random, move, patrol, follow, orbit, pick_ob, move_to_container1, movec2, place_ob]"/>
  <arg name="debug" default="false"/>
  <arg name="deploy" default="true"/>

The second reason could be that you are building and launching skiros2 from the wrong workspace. You could check which ros workspace is activated right now by typing roscd or roscd skiros2_examples on the command line. This will add the path of the current activated ros workspace on your command prompt. Having multiple workspaces can be confusing as it can be easy to forget to switch before building and launching from a new one.

There are two ways to establish your workspace as your current one. The first is to type gedit ~/.bashrc. This will open your bashrc file, which is executed every time you log in. Then type source /<path_to_ws>/devel/setup.bash. Alternatively, you can source while being in the workspace by typingsource devel/setup.bash

Error: no plugin with "skill name" exists

This error is caused based on the same reasons mentioned above so make sure that you are launching from the correct ros workspace. Check that your skill is correctly spelled in the .launch file. In addition, make sure that you put the name of the skill’s class on the launch file, NOT the name of its description.

Unable to spawn a container

A container is an area (set of points) in a Skiros scene that you can use to put objects in (e.g a table or a conveyor belt). You can spawn a container by code. Have a look at spawn primitive in turtlesim_primitives.py and make sure that you add this parameter on the primitive’s description:

self.addParam("Container", Element("cora:Container"), ParamTypes.Optional)

However, spawning through the GUI is the recommended way. You can spawn a container by going to the world tree tab, select the current scene (Scene-0 by default), click on the + button on the right, open the type dropdown menu, then choose location. Then open the subtype menu and choose Container. Then on the individual menu, you can choose large_box_test_starter which has all the parameters already set up.

In addition, you can add an object by choosing type -> product, subtype -> starter and individual -> starter79 for a preset object.

Connecting Rviz to skiros2 gui

Connecting Rviz is useful as the turtlesim cannot visualize anything else than the turtle. You can launch it by opening a terminal and typing roscore. Then you can launch skiros in a new terminal and you can add a third terminal in which you can launch rviz by simply typing rviz. In rviz, you can visualize the current scene by clicking on the add button on the bottom left, then rviz -> TF :

You can also add an interactive marker (add -> rviz -> InteractiveMarkers) to interact with 3D objects.

Using mon launch instead of ros launch

Mon launch is an alternative way to launch a file in ros, apart from ros launch. Its advantage is that you can make changes without killing the process and restarting it again. By pressing c and k, you stop the simulation and by pressing c and s you can start again.

Other useful tips to follow

You should always make sure that every skill has an expand function while every primitive has an execute function. It is also considered good practice to keep the skills and the primitives in separate files, having a primitives.py and a skills.py. By adding the following line, however, you can include primitives in skills.py :

from skiros2_common.core.primitive import PrimitiveBase

In case the code is not working, it’s important to pay attention to the warnings in yellow on the command line when a command is executed in Skiros. If there are no warnings, scroll up to the first error.

You can save the current scene from the Skiros GUI skiros as an owl file and then put it in the launch file, more specifically set it as the value of init_scene, as shown in the following snippet:

<include file="$(find skiros2)/launch/world_model_server.launch">
      <arg name="init_scene" value="my_world_with_container.turtle"/>
      <arg name="verbose" value="false"/>
      <arg name="gui" value="true"/>
      <arg name="reasoners_pkgs" value="[skiros2_std_reasoners]"/>
      <arg name="workspace_dir" value="$(find skiros2_examples)/owl"/>
      <arg name="debug" value="$(arg debug)"/>
      <arg name="deploy" value="$(arg deploy)"/>
  </include>

Then the scene will automatically load every time you launch Skiros.