Robotics StackExchange | Archived questions

rocon interactions fails in pairing yaml objects

I'm trying to get an exploration behavior working on a Turtlebot with a Kobuki base running ROS Kinetic on Ubuntu 16.04.5, which I'm accessing from a desktop computer with basically the same setup. Right now I'm working with turtlebotexploration3d (https://github.com/RobustFieldAutonomyLab/turtlebot_exploration_3d), which appears to be intended for ROS Indigo, though I don't think that's the cause of my issue. The Turtlebot itself seems to run fine, and I got started with the platform by going through the CoffeeBot tutorial (http://learn.turtlebot.com/), so I at least have that baseline.

According to the turtlebotexploration3d documentation, the first step to running this is to run the 'minimalexplo.launch' file un the turtlebotexploration3d package. Initially I had some issues with kinetic and xenial not being valid entries in the rocon rules.yaml, but after adding those entries for applicationframework and operating_system it seemed to get past that just fine. Now I'm seeing an error that I can't seem to track down:

setting /run_id to c67329f4-eabd-11e9-bd4c-7c7a9105e52e
process[rosout-1]: started with pid [9021]
started core service [/rosout]
process[robot_state_publisher-2]: started with pid [9039]
process[diagnostic_aggregator-3]: started with pid [9040]
process[mobile_base_nodelet_manager-4]: started with pid [9041]
process[cmd_vel_mux_nodelet_manager-5]: started with pid [9045]
process[bumper2pointcloud_nodelet_manager-6]: started with pid [9054]
process[mobile_base-7]: started with pid [9057]
process[bumper2pointcloud-8]: started with pid [9063]
process[cmd_vel_mux-9]: started with pid [9069]
process[turtlebot_laptop_battery-10]: started with pid [9084]
process[rocon/app_manager-11]: started with pid [9096]
process[rocon/master-12]: started with pid [9104]
process[rocon/zeroconf/zeroconf-13]: started with pid [9107]
process[capability_server-14]: started with pid [9119]
process[rocon/interactions-15]: started with pid [9129]
[ INFO] [1570643643.697325449]: Zeroconf: service successfully established [turtlebot][_ros-master._tcp][11311]
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/rocon_interactions/interactions_manager.py", line 20, in <module>
    interactions_manager = rocon_interactions.InteractionsManager()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rocon_interactions/manager.py", line 90, in __init__
    (pairings, interactions) = utils.load_msgs_from_yaml_resource(resource_name)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rocon_interactions/utils.py", line 173, in load_msgs_from_yaml_resource
    (pairings, interactions) = load_msgs_from_yaml_file(yaml_filename)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rocon_interactions/utils.py", line 121, in load_msgs_from_yaml_file
    pairing_yaml_objects = yaml_objects['pairings']
TypeError: list indices must be integers, not str
[rocon/interactions-15] process has died [pid 9129, exit code 1, cmd /opt/ros/kinetic/lib/rocon_interactions/interactions_manager.py interactions/rapp_list:=app_manager/rapp_list interactions/status:=app_manager/status interactions/start_rapp:=app_manager/start_rapp interactions/stop_rapp:=app_manager/stop_rapp __name:=interactions __log:=/home/turtlebot/.ros/log/c67329f4-eabd-11e9-bd4c-7c7a9105e52e/rocon-interactions-15.log].
log file: /home/turtlebot/.ros/log/c67329f4-eabd-11e9-bd4c-7c7a9105e52e/rocon-interactions-15*.log

The best that I can tell, there's a yaml file somewhere that describes interactions within the system to rocon and it's being parsed incorrectly into a list rather than into a dictionary, so when the Python script tries to access yaml_objects['pairings'] it can't parse the key correctly. But I can't find where the file is specified that is being accessed to try to debug it. I've search ROS Answers and Google, but no one else seems to have run into this particular error. Can anyone help me?

Asked by teddybouch on 2019-10-09 13:15:13 UTC

Comments

As an update, I've been able to figure out that the offending file is /turtlebot_bringup/interactions/admin.interactions and that there is a call to yaml.load that is loading the file into a list. Looking at the utils.py script, it's pretty clear that this is out of sync with the interactions file - it's looking for dictionary entries for 'interactions', 'pairings', and 'parameters', and none of those words are even in the file. I think that my next step is to roll back and see what (if any) interactions are being defined with rocon in the baseline turtlebot instance that I have working and use that as a baseline. But I'm having difficulty figuring out why rocon is necessary here in the first place. The ROS wiki (http://wiki.ros.org/rocon) indicates that it's intended to enable multimaster ROS, and I should only have one master on the Turtlebot. Not only that, but it looks like rocon is only integrated up to indigo. If I'm running kinetic, I'm not even sure why I have it.

Asked by teddybouch on 2019-10-10 07:26:59 UTC

Answers