Skip to content

Stopping multiple capabilities can cause errors #68

@bit-pirate

Description

@bit-pirate

Currently testing the rocon_apps/teleop rapp with capability support and noticed a strange error when shutting down the rapp and its dependent capabilities.

[INFO] [WallTime: 1399886941.441992] Rapp Manager : Stopping rapp 'rocon_apps/teleop'.
[turtlebot/relay_video-3] killing on exit
[turtlebot/relay_cmd_vel-2] killing on exit
[turtlebot/teleop_velocity_smoother-1] killing on exit
[ INFO] [1399886941.469684467]: Unloading nodelet /turtlebot/teleop_velocity_smoother from manager /capability_server_nodelet_manager
[INFO] [WallTime: 1399886942.874621] Rapp Manager : stopped rapp [rocon_apps/teleop]'.
[INFO] [WallTime: 1399886942.875491] Rapp Manager : Stopping required capabilities.
[INFO] [WallTime: 1399886942.884842] Request to free usage of capability 'std_capabilities/DifferentialMobileBase' (bond id 'b054c6ae-d9b7-11e3-b584-2cd05ab796d3')
[INFO] [WallTime: 1399886942.885948] Capability 'std_capabilities/DifferentialMobileBase' being stopped because it has zero references
[depthimage_to_laserscan-18] killing on exit
[camera/disparity_registered_hw-17] killing on exit
[camera/disparity_registered_sw-16] killing on exit
[camera/disparity_depth-15] killing on exit
[camera/points_xyzrgb_hw_registered-14] killing on exit
 [camera/points_xyzrgb_sw_registered-12] killing on exit
[camera/depth_registered_rectify_depth-13] killing on exit
[camera/register_depth_rgb-11] killing on exit
[camera/depth_points-10] killing on exit
[camera/depth_metric-9] killing on exit
[camera/depth_metric_rect-8] killing on exit
[camera/depth_rectify_depth-7] killing on exit
[camera/rectify_ir-6] killing on exit
[camera/rectify_color-5] killing on exit
[camera/rectify_mono-4] killing on exit
[camera/debayer-3] killing on exit
[camera/driver-2] killing on exit
[camera/camera_nodelet_manager-1] killing on exit
[camera/camera_nodelet_manager-1] escalating to SIGTERM
shutting down processing monitor...
... shutting down processing monitor complete
done
[turtlebot_bringup-2] killing on exit
Traceback (most recent call last):
  File "/home/yujin/ros_ws/turtlebot_ws/src/turtlebot/turtlebot_capabilities/providers/launch/placeholder.py", line 6, in <module>
    sleep(0.1)
KeyboardInterrupt
shutting down processing monitor...
... shutting down processing monitor complete
done
[robot_state_publisher-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
[ERROR] [WallTime: 1399886960.565455] Capability Instance 'turtlebot_capabilities/rgbd_sensor' cannot transition to 'stopping' from anything but 'launching' or 'running', current state is 'stopping'                                                                    
[INFO] [WallTime: 1399886960.566842] Capability Provider 'turtlebot_capabilities/rgbd_sensor' for Capability 'std_capabilities/RGBDSensor' has terminated.
[INFO] [WallTime: 1399886960.567999] Capability Provider 'turtlebot_capabilities/turtlebot2_bringup' for Capability 'turtlebot_capabilities/TurtleBotBringup' has terminated.
[INFO] [WallTime: 1399886960.568654] Stopping the 'turtlebot_capabilities/diagnostics' provider of the 'std_capabilities/Diagnostics' interface, because it has no dependents left.
[ERROR] [WallTime: 1399886960.570503] RuntimeError: No running launch file with PID of '815'
[diagnostic_aggregator-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
[INFO] [WallTime: 1399886961.621882] Capability Provider 'turtlebot_capabilities/robot_state_publisher' for Capability 'std_capabilities/RobotStatePublisher' has terminated.
[INFO] [WallTime: 1399886961.622872] Capability Provider 'turtlebot_capabilities/diagnostics' for Capability 'std_capabilities/Diagnostics' has terminated.
^C[zeroconf/zeroconf-6] killing on exit
[interactions-5] killing on exit
[app_manager-3] killing on exit
 [master-4] killing on exit
[capability_server-2] killing on exit
Traceback (most recent call last):
  File "/home/yujin/ros_ws/rocon_ws/src/capabilities/src/capabilities/placeholder_script", line 6, in <module>
    sleep(0.1)
KeyboardInterrupt
[ERROR] [WallTime: 1399887012.879617] Capability Instance 'kobuki_capabilities/kobuki_differential_mobile_base' terminated unexpectedly, it was previously in the 'running' state.
[INFO] [WallTime: 1399887012.880260] Capability Provider 'kobuki_capabilities/kobuki_differential_mobile_base' for Capability 'std_capabilities/DifferentialMobileBase' has terminated.
[INFO] [WallTime: 1399887012.880685] Stopping the 'kobuki_capabilities/kobuki_bringup' provider of the 'kobuki_capabilities/KobukiBringup' interface, because it has no dependents left.

So, here an error is thrown when the RGBDSensor capability is requested to be stopped, while it is in the stopping state. This error is reported in the service response, which makes the rapp manager abort the stopping of the other caps.

I see two improvements required.

  • Requesting to stop a stopping cap probably shouldn't be treated as an error
  • The rapp manager should continue to stop the remaining capabilities.

I'll look into the stopping capability issue in the rapp manager (robotics-in-concert/rocon_app_platform#233). @wjwwood could you take a look at the capability server part of this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions