app_manager package from app_manager repo

app_manager

Package Summary

Tags No category tags.
Version 1.3.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/pr2/app_manager.git
VCS Type git
VCS Version kinetic-devel
Last Updated 2022-10-13
Dev Status UNMAINTAINED
CI status
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

app_manager

Additional Links

Maintainers

  • ROS Orphaned Package Maintainers

Authors

  • Jeremy Leibs
  • Ken Conley
  • Yuki Furuta

app_manager Build Status

A package for making launch file an application

Installation

Run sudo apt-get install ros-$ROS_DISTRO-app-manager

Usage

The app_manager node loads information of available application from .installed files. .installed file is a yaml file that defines installed applications in a package like below:

# package_root/apps/app.installed
apps:
- app: pkg_name/app_name1
  display: sample app
- app: pkg_name/app_name2
  display: another sample app

Once .installed file is defined, you have to notify the location of the files to app_manager by either of two ways:

  1. Give the locations as arguments

One way to notify the location is to add --applist argument with rosrun.

rosrun app_manager app_manager --applist `rospack find package_root`/apps

This is useful for testing one small .installed file or a demonstration.

  1. Register as export attributes

Another way to notify the location is to define them in <export> tag in package.xml.

<!-- package_root/package.xml -->
<package>
  ...
  <run_depend>app_manager</run_depend>
  ...
  <export>
    <app_manager app_dir="${prefix}/apps"/>
  </export>
</package>

And launch app_manager without any argument:

rosrun app_manager app_manager

app_manager node automatically searches all .installed files and register as available applications.

Applications can be filtered by platform defined in each .app file. If you set the parameter /robot/type to pr2, then apps for platform pr2 will be available.

rosparam set /robot/type pr2

APIs

All topics/services are advertised under the namespace specified by the parameter /robot/name.

Publishing Topics

  • app_list: List available/running applications
  • application/app_status: Current status of app manager

Services

  • list_apps: List available/running applications
  • start_app: Start an available application
  • stop_app: Stop a runniing application
  • reload_app_list: Reload installed applications from *.installed) file.

Examples

Start default roscore

$ roscore


and start another roscore for app_manager from another Terminal

$ roscore -p 11312

Start app_manager

$ rosrun app_manager app_manager --applist `rospack find app_manager`/test/applist1 _interface_master:=http://localhost:11312

Make sure that it founds the apps

[INFO] [1575604033.724035]: 1 apps found in /home/user/catkin_ws/src/app_manager/test/applist1/apps1.installed

Use service calls to list and start apps.

$ rosservice call robot/list_apps
running_apps: []
available_apps:
  -
    name: "app_manager/appA"
    display_name: "Android Joystick"
    icon:
      format: ''
      data: []
    client_apps: []

$ rosservice call /robot/start_app "name: 'app_manager/appA'
args:
- key: 'foo'
  value: 'bar'"

started: True
error_code: 0
message: "app [app_manager/appA] started"
namespace: "/robot/application"

Plugins

You can define app_manager plugins as below in app file such as test.app.

# app definitions
display: Test app
platform: all
launch: test_app_manager/test_app.xml
interface: test_app_manager/test_app.interface
# plugin definitions
plugins:
  - name: mail_notifier_plugin  # name to identify this plugin
    type: app_notifier/mail_notifier_plugin  # plugin type
    launch_args:  # arguments for plugin launch file
      foo: hello
    launch_arg_yaml: /etc/mail_notifier_launch_arg.yaml  # argument yaml file for plugin launch file
    # in this case, these arguments will be passed.
    # {"hoge": 100, "fuga": 30, "bar": 10} will be passed to start plugin
    # {"hoge": 50, "fuga": 30} will be passed to stop plugin
    plugin_args:  # arguments for plugin function
      hoge: 10
      fuga: 30
    start_plugin_args:  # arguments for start plugin function
      hoge: 100  # arguments for start plugin function arguments (it overwrites plugin_args hoge: 10 -> 100)
      bar: 10
    stop_plugin_args:  # arguments for stop plugin function
      hoge: 50  # arguments for stop plugin function arguments (it overwrites plugin_args hoge: 10 -> 50)
    plugin_arg_yaml: /etc/mail_notifier_plugin_arg.yaml  # argument yaml file for plugin function arguments
  - name: rosbag_recorder_plugin  # another plugin
    type app_recorder/rosbag_recorder_plugin
    launch_args:
      rosbag_path: /tmp
      rosbag_title: test.bag
      compress: true
      rosbag_topic_names:
        - /rosout
        - /tf
        - /tf_static
plugin_order: # plugin running orders. if you don't set field, plugin will be run in order in plugins field
  start_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin  # 1st plugin name
    - mail_notifier_plugin  #2nd plugin name
  stop_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin
    - mail_notifier_plugin

Sample plugin repository is knorth55/app_manager_utils.

For more detailed information, please read #25.

Maintainer

Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>

CHANGELOG

Changelog for package app_manager

1.3.0 (2021-11-08)

  • update setuptools to follow noetic migration guide (#36)
  • app_manager cannot start app after failing app #42 (#42)
    • set current_app None when start failed
    • add test_start_fail.test
    • need catch error on _stop_current()
    • add test_start_fail.test test to check #42, app_manager cannot start app after failing app
  • add test to check if we forget catkin_install_python (#44)
    • call app_manager/appA with python2/python3 with ROS_PYTHON_VERSION
    • use catkin_install_python for noetic
    • add test to check if we forget to use catkin_install_python
  • add_rostest(test/test_plugin.test) (#45)
    • run rosdep install in devel_create_tasks.Dockerfile
    • update to format3 and install python-rosdep
    • use port 11313 for app_manager in test_plugin.test
    • add_rostest(test/test_plugin.test)
  • add more test code (#41
    • show more error messages
    • default return value of plugin_order must be list
    • plugins: \'launch_args\', \'plugin_args\', \'start_plugin_args\', \'stop_plugin_args\' must be dict, not list
    • test_plugin: add test to check plugins
    • use list(self.subs.items()) instead of self.subs.items()
    • Error processing request: \'>\' not supported between instances of \'NoneType\' and \'int\'
    • python3: AttributeError: \'dict\' object has no attribute \'iteritems\'
    • add test for list_apps/stop_app, add test_stop_app.py
    • python3: AttributeError: \'dict\' object has no attribute \'iterkeys\'
    • add 2to3 in CHECK_PYTHON3_COMPILE
    • add test/test_app.test
    • test/resources/example-moin.launch: use arg launch_prefox to select if we use xterm or not
  • add arguments in StartAppRequest (#27)
    • use req.args for launch args in app_manager.py
    • add args in StartApp srv
  • do not run stop_app when _stopping is true (#38)
  • fix travis build (#39)
    • fix typo in .travis.yml
    • run with full path
    • add CHECK_PYTHON2_COMPILE and CHECK_PYTHON3_COMPILE tests
  • use plugins as instance / use normal method in app_manager_plugin (#37)
  • set stopped true in app timeout (#31)
  • use system python to check python3 compileall (#34)
  • Contributors: Kei Okada, Shingo Kitagawa

1.2.0 (2021-03-03)

  • Merge pull request #29 from knorth55/add-stopped
  • Merge pull request #28 from knorth55/add-timeout
  • Merge pull request #30 from knorth55/add-all-availables add available_apps in all platform apps
  • add available_apps in all platform apps
  • add stopped context in app_manager plugin
  • add timeout field in app file
  • add enable_app_replacement param in app_manager (#26) This allows for both behaviors (replace currently running app or error out) and let\'s users choose without changing code...
  • add noetic test and also checks python 2/3 compatibility (#24)

    • add noetic test and also checks python 2/3 compatibility
    • fix to support both python 2/3

    * use rospy.log** instead of print Co-authored-by: Shingo Kitagawa <shingogo@hotmail.co.jp>

  • Add app manager plugin (#25) Enable aspect-oriented modelling, e.g.

    • send a mail when someone starts an app
    • auto-record rosbags during app run

    - auto-upload files on app-close ... - start plugin launch in app_manager - start and stop plugin function - pass app in plugin functions - add exit_code in stop_plugin_attr - stop plugin functions when shutdown is called - launch when plugin - load plugin launch when it exists - use ctx instead of exit_code - pass exit_code to ctx - add plugins in AppDefinition - add _current_plugins and _plugin_context - pass launch arguments - add plugin_args for app plugins - overwrite roslaunch.config.load_config_default for kinetic - add __stop_current for shutdown and __stop_current - support \"module: null\" syntax for app definition - add app_manager plugin base class - refactor scripts/app_manager - add start_plugin_args and stop_plugin_args - add start_plugin_arg_yaml and stop_plugin_arg_yaml - add launch_arg_yaml - add plugin_order to set plugin order - update readme to add plugin doc - update readme to add app definitions

  • fix readme (#23)

  • add exit_code log in app_manager (#22) add exit_code log in app_manager During successful execution, [dead_list]{.title-ref} should always end up empty.

  • add all platform for all robots (#17) add an additional keyword to explicitly support \'all\' platforms

  • use rospack to search for app_manager app_dir (#19)

    • use rospack to search for app_manager app_dir
    • remove unused imports
    • use both --applist and plugin app_dir
  • Merge pull request #20 from knorth55/fix-print-python3 use rospy.logerr to escape print error in python3

  • use rospy.logerr to escape print error in python3

  • Contributors: Kei Okada, Michael G

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • test/resources/example-min.launch
      • launch_prefix [default: xterm -e]
  • launch/app_manager.launch
      • master [default: true] — launch master if enabled
      • master_address [default: localhost] — address for app_manager master
      • master_port [default: 11313] — port for app_manager master
      • sigint_timeout [default: 15.0] — Time between sending sigint and sending sigterm to ROSLaunchParent
      • sigterm_timeout [default: 2.0] — Time between sending sigterm and sending sigkill to ROSLaunchParent
      • use_applist [default: false] — load apps from applist argument
      • applist [default: ] — app dirs (space separated)
      • respawn [default: false] — respawn app_manager
      • enable_app_replacement [default: true] — Enable app replacement by running another app, or not
      • enable_topic_remapping [default: true] — Enable name remapping of topic written in interface to app_manager namespace , or not
      • app_manager_args [default: --applist $(arg applist)]
      • app_manager_args [default: ]
  • test/plugin/sample_node.xml
      • param1 [default: param1]
      • param2 [default: param2]
      • success [default: false]
      • fail [default: false]

Plugins

No plugins found.

Recent questions tagged app_manager at Robotics Stack Exchange

app_manager package from app_manager repo

app_manager

Package Summary

Tags No category tags.
Version 1.3.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/pr2/app_manager.git
VCS Type git
VCS Version kinetic-devel
Last Updated 2022-10-13
Dev Status UNMAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

app_manager

Additional Links

Maintainers

  • ROS Orphaned Package Maintainers

Authors

  • Jeremy Leibs
  • Ken Conley
  • Yuki Furuta

app_manager Build Status

A package for making launch file an application

Installation

Run sudo apt-get install ros-$ROS_DISTRO-app-manager

Usage

The app_manager node loads information of available application from .installed files. .installed file is a yaml file that defines installed applications in a package like below:

# package_root/apps/app.installed
apps:
- app: pkg_name/app_name1
  display: sample app
- app: pkg_name/app_name2
  display: another sample app

Once .installed file is defined, you have to notify the location of the files to app_manager by either of two ways:

  1. Give the locations as arguments

One way to notify the location is to add --applist argument with rosrun.

rosrun app_manager app_manager --applist `rospack find package_root`/apps

This is useful for testing one small .installed file or a demonstration.

  1. Register as export attributes

Another way to notify the location is to define them in <export> tag in package.xml.

<!-- package_root/package.xml -->
<package>
  ...
  <run_depend>app_manager</run_depend>
  ...
  <export>
    <app_manager app_dir="${prefix}/apps"/>
  </export>
</package>

And launch app_manager without any argument:

rosrun app_manager app_manager

app_manager node automatically searches all .installed files and register as available applications.

Applications can be filtered by platform defined in each .app file. If you set the parameter /robot/type to pr2, then apps for platform pr2 will be available.

rosparam set /robot/type pr2

APIs

All topics/services are advertised under the namespace specified by the parameter /robot/name.

Publishing Topics

  • app_list: List available/running applications
  • application/app_status: Current status of app manager

Services

  • list_apps: List available/running applications
  • start_app: Start an available application
  • stop_app: Stop a runniing application
  • reload_app_list: Reload installed applications from *.installed) file.

Examples

Start default roscore

$ roscore


and start another roscore for app_manager from another Terminal

$ roscore -p 11312

Start app_manager

$ rosrun app_manager app_manager --applist `rospack find app_manager`/test/applist1 _interface_master:=http://localhost:11312

Make sure that it founds the apps

[INFO] [1575604033.724035]: 1 apps found in /home/user/catkin_ws/src/app_manager/test/applist1/apps1.installed

Use service calls to list and start apps.

$ rosservice call robot/list_apps
running_apps: []
available_apps:
  -
    name: "app_manager/appA"
    display_name: "Android Joystick"
    icon:
      format: ''
      data: []
    client_apps: []

$ rosservice call /robot/start_app "name: 'app_manager/appA'
args:
- key: 'foo'
  value: 'bar'"

started: True
error_code: 0
message: "app [app_manager/appA] started"
namespace: "/robot/application"

Plugins

You can define app_manager plugins as below in app file such as test.app.

# app definitions
display: Test app
platform: all
launch: test_app_manager/test_app.xml
interface: test_app_manager/test_app.interface
# plugin definitions
plugins:
  - name: mail_notifier_plugin  # name to identify this plugin
    type: app_notifier/mail_notifier_plugin  # plugin type
    launch_args:  # arguments for plugin launch file
      foo: hello
    launch_arg_yaml: /etc/mail_notifier_launch_arg.yaml  # argument yaml file for plugin launch file
    # in this case, these arguments will be passed.
    # {"hoge": 100, "fuga": 30, "bar": 10} will be passed to start plugin
    # {"hoge": 50, "fuga": 30} will be passed to stop plugin
    plugin_args:  # arguments for plugin function
      hoge: 10
      fuga: 30
    start_plugin_args:  # arguments for start plugin function
      hoge: 100  # arguments for start plugin function arguments (it overwrites plugin_args hoge: 10 -> 100)
      bar: 10
    stop_plugin_args:  # arguments for stop plugin function
      hoge: 50  # arguments for stop plugin function arguments (it overwrites plugin_args hoge: 10 -> 50)
    plugin_arg_yaml: /etc/mail_notifier_plugin_arg.yaml  # argument yaml file for plugin function arguments
  - name: rosbag_recorder_plugin  # another plugin
    type app_recorder/rosbag_recorder_plugin
    launch_args:
      rosbag_path: /tmp
      rosbag_title: test.bag
      compress: true
      rosbag_topic_names:
        - /rosout
        - /tf
        - /tf_static
plugin_order: # plugin running orders. if you don't set field, plugin will be run in order in plugins field
  start_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin  # 1st plugin name
    - mail_notifier_plugin  #2nd plugin name
  stop_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin
    - mail_notifier_plugin

Sample plugin repository is knorth55/app_manager_utils.

For more detailed information, please read #25.

Maintainer

Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>

CHANGELOG

Changelog for package app_manager

1.3.0 (2021-11-08)

  • update setuptools to follow noetic migration guide (#36)
  • app_manager cannot start app after failing app #42 (#42)
    • set current_app None when start failed
    • add test_start_fail.test
    • need catch error on _stop_current()
    • add test_start_fail.test test to check #42, app_manager cannot start app after failing app
  • add test to check if we forget catkin_install_python (#44)
    • call app_manager/appA with python2/python3 with ROS_PYTHON_VERSION
    • use catkin_install_python for noetic
    • add test to check if we forget to use catkin_install_python
  • add_rostest(test/test_plugin.test) (#45)
    • run rosdep install in devel_create_tasks.Dockerfile
    • update to format3 and install python-rosdep
    • use port 11313 for app_manager in test_plugin.test
    • add_rostest(test/test_plugin.test)
  • add more test code (#41
    • show more error messages
    • default return value of plugin_order must be list
    • plugins: \'launch_args\', \'plugin_args\', \'start_plugin_args\', \'stop_plugin_args\' must be dict, not list
    • test_plugin: add test to check plugins
    • use list(self.subs.items()) instead of self.subs.items()
    • Error processing request: \'>\' not supported between instances of \'NoneType\' and \'int\'
    • python3: AttributeError: \'dict\' object has no attribute \'iteritems\'
    • add test for list_apps/stop_app, add test_stop_app.py
    • python3: AttributeError: \'dict\' object has no attribute \'iterkeys\'
    • add 2to3 in CHECK_PYTHON3_COMPILE
    • add test/test_app.test
    • test/resources/example-moin.launch: use arg launch_prefox to select if we use xterm or not
  • add arguments in StartAppRequest (#27)
    • use req.args for launch args in app_manager.py
    • add args in StartApp srv
  • do not run stop_app when _stopping is true (#38)
  • fix travis build (#39)
    • fix typo in .travis.yml
    • run with full path
    • add CHECK_PYTHON2_COMPILE and CHECK_PYTHON3_COMPILE tests
  • use plugins as instance / use normal method in app_manager_plugin (#37)
  • set stopped true in app timeout (#31)
  • use system python to check python3 compileall (#34)
  • Contributors: Kei Okada, Shingo Kitagawa

1.2.0 (2021-03-03)

  • Merge pull request #29 from knorth55/add-stopped
  • Merge pull request #28 from knorth55/add-timeout
  • Merge pull request #30 from knorth55/add-all-availables add available_apps in all platform apps
  • add available_apps in all platform apps
  • add stopped context in app_manager plugin
  • add timeout field in app file
  • add enable_app_replacement param in app_manager (#26) This allows for both behaviors (replace currently running app or error out) and let\'s users choose without changing code...
  • add noetic test and also checks python 2/3 compatibility (#24)

    • add noetic test and also checks python 2/3 compatibility
    • fix to support both python 2/3

    * use rospy.log** instead of print Co-authored-by: Shingo Kitagawa <shingogo@hotmail.co.jp>

  • Add app manager plugin (#25) Enable aspect-oriented modelling, e.g.

    • send a mail when someone starts an app
    • auto-record rosbags during app run

    - auto-upload files on app-close ... - start plugin launch in app_manager - start and stop plugin function - pass app in plugin functions - add exit_code in stop_plugin_attr - stop plugin functions when shutdown is called - launch when plugin - load plugin launch when it exists - use ctx instead of exit_code - pass exit_code to ctx - add plugins in AppDefinition - add _current_plugins and _plugin_context - pass launch arguments - add plugin_args for app plugins - overwrite roslaunch.config.load_config_default for kinetic - add __stop_current for shutdown and __stop_current - support \"module: null\" syntax for app definition - add app_manager plugin base class - refactor scripts/app_manager - add start_plugin_args and stop_plugin_args - add start_plugin_arg_yaml and stop_plugin_arg_yaml - add launch_arg_yaml - add plugin_order to set plugin order - update readme to add plugin doc - update readme to add app definitions

  • fix readme (#23)

  • add exit_code log in app_manager (#22) add exit_code log in app_manager During successful execution, [dead_list]{.title-ref} should always end up empty.

  • add all platform for all robots (#17) add an additional keyword to explicitly support \'all\' platforms

  • use rospack to search for app_manager app_dir (#19)

    • use rospack to search for app_manager app_dir
    • remove unused imports
    • use both --applist and plugin app_dir
  • Merge pull request #20 from knorth55/fix-print-python3 use rospy.logerr to escape print error in python3

  • use rospy.logerr to escape print error in python3

  • Contributors: Kei Okada, Michael G

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • test/resources/example-min.launch
      • launch_prefix [default: xterm -e]
  • launch/app_manager.launch
      • master [default: true] — launch master if enabled
      • master_address [default: localhost] — address for app_manager master
      • master_port [default: 11313] — port for app_manager master
      • sigint_timeout [default: 15.0] — Time between sending sigint and sending sigterm to ROSLaunchParent
      • sigterm_timeout [default: 2.0] — Time between sending sigterm and sending sigkill to ROSLaunchParent
      • use_applist [default: false] — load apps from applist argument
      • applist [default: ] — app dirs (space separated)
      • respawn [default: false] — respawn app_manager
      • enable_app_replacement [default: true] — Enable app replacement by running another app, or not
      • enable_topic_remapping [default: true] — Enable name remapping of topic written in interface to app_manager namespace , or not
      • app_manager_args [default: --applist $(arg applist)]
      • app_manager_args [default: ]
  • test/plugin/sample_node.xml
      • param1 [default: param1]
      • param2 [default: param2]
      • success [default: false]
      • fail [default: false]

Plugins

No plugins found.

Recent questions tagged app_manager at Robotics Stack Exchange

app_manager package from app_manager repo

app_manager

Package Summary

Tags No category tags.
Version 1.0.4
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/pr2/app_manager.git
VCS Type git
VCS Version hydro-devel
Last Updated 2018-02-14
Dev Status UNMAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

app_manager

Additional Links

Maintainers

  • ROS Orphaned Package Maintainers

Authors

  • Jeremy Leibs
  • Ken Conley
README
No README found. No README in repository either.
CHANGELOG

Changelog for package app_manager

1.0.3 (2015-02-06)

1.0.2 (2014-10-14)

  • changelogs
  • Fixed installs on app_manager
  • Contributors: TheDash
  • Fixed installs on app_manager
  • Contributors: TheDash

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Recent questions tagged app_manager at Robotics Stack Exchange

app_manager package from app_manager repo

app_manager

Package Summary

Tags No category tags.
Version 1.0.4
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/pr2/app_manager.git
VCS Type git
VCS Version hydro-devel
Last Updated 2018-02-14
Dev Status UNMAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

app_manager

Additional Links

Maintainers

  • ROS Orphaned Package Maintainers

Authors

  • Jeremy Leibs
  • Ken Conley
README
No README found. No README in repository either.
CHANGELOG

Changelog for package app_manager

1.0.3 (2015-02-06)

1.0.2 (2014-10-14)

  • changelogs
  • Fixed installs on app_manager
  • Contributors: TheDash
  • Fixed installs on app_manager
  • Contributors: TheDash

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Recent questions tagged app_manager at Robotics Stack Exchange

app_manager package from app_manager repo

app_manager

Package Summary

Tags No category tags.
Version 1.3.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/pr2/app_manager.git
VCS Type git
VCS Version kinetic-devel
Last Updated 2022-10-13
Dev Status UNMAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

app_manager

Additional Links

Maintainers

  • ROS Orphaned Package Maintainers

Authors

  • Jeremy Leibs
  • Ken Conley
  • Yuki Furuta

app_manager Build Status

A package for making launch file an application

Installation

Run sudo apt-get install ros-$ROS_DISTRO-app-manager

Usage

The app_manager node loads information of available application from .installed files. .installed file is a yaml file that defines installed applications in a package like below:

# package_root/apps/app.installed
apps:
- app: pkg_name/app_name1
  display: sample app
- app: pkg_name/app_name2
  display: another sample app

Once .installed file is defined, you have to notify the location of the files to app_manager by either of two ways:

  1. Give the locations as arguments

One way to notify the location is to add --applist argument with rosrun.

rosrun app_manager app_manager --applist `rospack find package_root`/apps

This is useful for testing one small .installed file or a demonstration.

  1. Register as export attributes

Another way to notify the location is to define them in <export> tag in package.xml.

<!-- package_root/package.xml -->
<package>
  ...
  <run_depend>app_manager</run_depend>
  ...
  <export>
    <app_manager app_dir="${prefix}/apps"/>
  </export>
</package>

And launch app_manager without any argument:

rosrun app_manager app_manager

app_manager node automatically searches all .installed files and register as available applications.

Applications can be filtered by platform defined in each .app file. If you set the parameter /robot/type to pr2, then apps for platform pr2 will be available.

rosparam set /robot/type pr2

APIs

All topics/services are advertised under the namespace specified by the parameter /robot/name.

Publishing Topics

  • app_list: List available/running applications
  • application/app_status: Current status of app manager

Services

  • list_apps: List available/running applications
  • start_app: Start an available application
  • stop_app: Stop a runniing application
  • reload_app_list: Reload installed applications from *.installed) file.

Examples

Start default roscore

$ roscore


and start another roscore for app_manager from another Terminal

$ roscore -p 11312

Start app_manager

$ rosrun app_manager app_manager --applist `rospack find app_manager`/test/applist1 _interface_master:=http://localhost:11312

Make sure that it founds the apps

[INFO] [1575604033.724035]: 1 apps found in /home/user/catkin_ws/src/app_manager/test/applist1/apps1.installed

Use service calls to list and start apps.

$ rosservice call robot/list_apps
running_apps: []
available_apps:
  -
    name: "app_manager/appA"
    display_name: "Android Joystick"
    icon:
      format: ''
      data: []
    client_apps: []

$ rosservice call /robot/start_app "name: 'app_manager/appA'
args:
- key: 'foo'
  value: 'bar'"

started: True
error_code: 0
message: "app [app_manager/appA] started"
namespace: "/robot/application"

Plugins

You can define app_manager plugins as below in app file such as test.app.

# app definitions
display: Test app
platform: all
launch: test_app_manager/test_app.xml
interface: test_app_manager/test_app.interface
# plugin definitions
plugins:
  - name: mail_notifier_plugin  # name to identify this plugin
    type: app_notifier/mail_notifier_plugin  # plugin type
    launch_args:  # arguments for plugin launch file
      foo: hello
    launch_arg_yaml: /etc/mail_notifier_launch_arg.yaml  # argument yaml file for plugin launch file
    # in this case, these arguments will be passed.
    # {"hoge": 100, "fuga": 30, "bar": 10} will be passed to start plugin
    # {"hoge": 50, "fuga": 30} will be passed to stop plugin
    plugin_args:  # arguments for plugin function
      hoge: 10
      fuga: 30
    start_plugin_args:  # arguments for start plugin function
      hoge: 100  # arguments for start plugin function arguments (it overwrites plugin_args hoge: 10 -> 100)
      bar: 10
    stop_plugin_args:  # arguments for stop plugin function
      hoge: 50  # arguments for stop plugin function arguments (it overwrites plugin_args hoge: 10 -> 50)
    plugin_arg_yaml: /etc/mail_notifier_plugin_arg.yaml  # argument yaml file for plugin function arguments
  - name: rosbag_recorder_plugin  # another plugin
    type app_recorder/rosbag_recorder_plugin
    launch_args:
      rosbag_path: /tmp
      rosbag_title: test.bag
      compress: true
      rosbag_topic_names:
        - /rosout
        - /tf
        - /tf_static
plugin_order: # plugin running orders. if you don't set field, plugin will be run in order in plugins field
  start_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin  # 1st plugin name
    - mail_notifier_plugin  #2nd plugin name
  stop_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin
    - mail_notifier_plugin

Sample plugin repository is knorth55/app_manager_utils.

For more detailed information, please read #25.

Maintainer

Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>

CHANGELOG

Changelog for package app_manager

1.3.0 (2021-11-08)

  • update setuptools to follow noetic migration guide (#36)
  • app_manager cannot start app after failing app #42 (#42)
    • set current_app None when start failed
    • add test_start_fail.test
    • need catch error on _stop_current()
    • add test_start_fail.test test to check #42, app_manager cannot start app after failing app
  • add test to check if we forget catkin_install_python (#44)
    • call app_manager/appA with python2/python3 with ROS_PYTHON_VERSION
    • use catkin_install_python for noetic
    • add test to check if we forget to use catkin_install_python
  • add_rostest(test/test_plugin.test) (#45)
    • run rosdep install in devel_create_tasks.Dockerfile
    • update to format3 and install python-rosdep
    • use port 11313 for app_manager in test_plugin.test
    • add_rostest(test/test_plugin.test)
  • add more test code (#41
    • show more error messages
    • default return value of plugin_order must be list
    • plugins: \'launch_args\', \'plugin_args\', \'start_plugin_args\', \'stop_plugin_args\' must be dict, not list
    • test_plugin: add test to check plugins
    • use list(self.subs.items()) instead of self.subs.items()
    • Error processing request: \'>\' not supported between instances of \'NoneType\' and \'int\'
    • python3: AttributeError: \'dict\' object has no attribute \'iteritems\'
    • add test for list_apps/stop_app, add test_stop_app.py
    • python3: AttributeError: \'dict\' object has no attribute \'iterkeys\'
    • add 2to3 in CHECK_PYTHON3_COMPILE
    • add test/test_app.test
    • test/resources/example-moin.launch: use arg launch_prefox to select if we use xterm or not
  • add arguments in StartAppRequest (#27)
    • use req.args for launch args in app_manager.py
    • add args in StartApp srv
  • do not run stop_app when _stopping is true (#38)
  • fix travis build (#39)
    • fix typo in .travis.yml
    • run with full path
    • add CHECK_PYTHON2_COMPILE and CHECK_PYTHON3_COMPILE tests
  • use plugins as instance / use normal method in app_manager_plugin (#37)
  • set stopped true in app timeout (#31)
  • use system python to check python3 compileall (#34)
  • Contributors: Kei Okada, Shingo Kitagawa

1.2.0 (2021-03-03)

  • Merge pull request #29 from knorth55/add-stopped
  • Merge pull request #28 from knorth55/add-timeout
  • Merge pull request #30 from knorth55/add-all-availables add available_apps in all platform apps
  • add available_apps in all platform apps
  • add stopped context in app_manager plugin
  • add timeout field in app file
  • add enable_app_replacement param in app_manager (#26) This allows for both behaviors (replace currently running app or error out) and let\'s users choose without changing code...
  • add noetic test and also checks python 2/3 compatibility (#24)

    • add noetic test and also checks python 2/3 compatibility
    • fix to support both python 2/3

    * use rospy.log** instead of print Co-authored-by: Shingo Kitagawa <shingogo@hotmail.co.jp>

  • Add app manager plugin (#25) Enable aspect-oriented modelling, e.g.

    • send a mail when someone starts an app
    • auto-record rosbags during app run

    - auto-upload files on app-close ... - start plugin launch in app_manager - start and stop plugin function - pass app in plugin functions - add exit_code in stop_plugin_attr - stop plugin functions when shutdown is called - launch when plugin - load plugin launch when it exists - use ctx instead of exit_code - pass exit_code to ctx - add plugins in AppDefinition - add _current_plugins and _plugin_context - pass launch arguments - add plugin_args for app plugins - overwrite roslaunch.config.load_config_default for kinetic - add __stop_current for shutdown and __stop_current - support \"module: null\" syntax for app definition - add app_manager plugin base class - refactor scripts/app_manager - add start_plugin_args and stop_plugin_args - add start_plugin_arg_yaml and stop_plugin_arg_yaml - add launch_arg_yaml - add plugin_order to set plugin order - update readme to add plugin doc - update readme to add app definitions

  • fix readme (#23)

  • add exit_code log in app_manager (#22) add exit_code log in app_manager During successful execution, [dead_list]{.title-ref} should always end up empty.

  • add all platform for all robots (#17) add an additional keyword to explicitly support \'all\' platforms

  • use rospack to search for app_manager app_dir (#19)

    • use rospack to search for app_manager app_dir
    • remove unused imports
    • use both --applist and plugin app_dir
  • Merge pull request #20 from knorth55/fix-print-python3 use rospy.logerr to escape print error in python3

  • use rospy.logerr to escape print error in python3

  • Contributors: Kei Okada, Michael G

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • test/resources/example-min.launch
      • launch_prefix [default: xterm -e]
  • launch/app_manager.launch
      • master [default: true] — launch master if enabled
      • master_address [default: localhost] — address for app_manager master
      • master_port [default: 11313] — port for app_manager master
      • sigint_timeout [default: 15.0] — Time between sending sigint and sending sigterm to ROSLaunchParent
      • sigterm_timeout [default: 2.0] — Time between sending sigterm and sending sigkill to ROSLaunchParent
      • use_applist [default: false] — load apps from applist argument
      • applist [default: ] — app dirs (space separated)
      • respawn [default: false] — respawn app_manager
      • enable_app_replacement [default: true] — Enable app replacement by running another app, or not
      • enable_topic_remapping [default: true] — Enable name remapping of topic written in interface to app_manager namespace , or not
      • app_manager_args [default: --applist $(arg applist)]
      • app_manager_args [default: ]
  • test/plugin/sample_node.xml
      • param1 [default: param1]
      • param2 [default: param2]
      • success [default: false]
      • fail [default: false]

Plugins

No plugins found.

Recent questions tagged app_manager at Robotics Stack Exchange

app_manager package from app_manager repo

app_manager

Package Summary

Tags No category tags.
Version 1.3.0
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/pr2/app_manager.git
VCS Type git
VCS Version kinetic-devel
Last Updated 2022-10-13
Dev Status UNMAINTAINED
CI status
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

app_manager

Additional Links

Maintainers

  • ROS Orphaned Package Maintainers

Authors

  • Jeremy Leibs
  • Ken Conley
  • Yuki Furuta

app_manager Build Status

A package for making launch file an application

Installation

Run sudo apt-get install ros-$ROS_DISTRO-app-manager

Usage

The app_manager node loads information of available application from .installed files. .installed file is a yaml file that defines installed applications in a package like below:

# package_root/apps/app.installed
apps:
- app: pkg_name/app_name1
  display: sample app
- app: pkg_name/app_name2
  display: another sample app

Once .installed file is defined, you have to notify the location of the files to app_manager by either of two ways:

  1. Give the locations as arguments

One way to notify the location is to add --applist argument with rosrun.

rosrun app_manager app_manager --applist `rospack find package_root`/apps

This is useful for testing one small .installed file or a demonstration.

  1. Register as export attributes

Another way to notify the location is to define them in <export> tag in package.xml.

<!-- package_root/package.xml -->
<package>
  ...
  <run_depend>app_manager</run_depend>
  ...
  <export>
    <app_manager app_dir="${prefix}/apps"/>
  </export>
</package>

And launch app_manager without any argument:

rosrun app_manager app_manager

app_manager node automatically searches all .installed files and register as available applications.

Applications can be filtered by platform defined in each .app file. If you set the parameter /robot/type to pr2, then apps for platform pr2 will be available.

rosparam set /robot/type pr2

APIs

All topics/services are advertised under the namespace specified by the parameter /robot/name.

Publishing Topics

  • app_list: List available/running applications
  • application/app_status: Current status of app manager

Services

  • list_apps: List available/running applications
  • start_app: Start an available application
  • stop_app: Stop a runniing application
  • reload_app_list: Reload installed applications from *.installed) file.

Examples

Start default roscore

$ roscore


and start another roscore for app_manager from another Terminal

$ roscore -p 11312

Start app_manager

$ rosrun app_manager app_manager --applist `rospack find app_manager`/test/applist1 _interface_master:=http://localhost:11312

Make sure that it founds the apps

[INFO] [1575604033.724035]: 1 apps found in /home/user/catkin_ws/src/app_manager/test/applist1/apps1.installed

Use service calls to list and start apps.

$ rosservice call robot/list_apps
running_apps: []
available_apps:
  -
    name: "app_manager/appA"
    display_name: "Android Joystick"
    icon:
      format: ''
      data: []
    client_apps: []

$ rosservice call /robot/start_app "name: 'app_manager/appA'
args:
- key: 'foo'
  value: 'bar'"

started: True
error_code: 0
message: "app [app_manager/appA] started"
namespace: "/robot/application"

Plugins

You can define app_manager plugins as below in app file such as test.app.

# app definitions
display: Test app
platform: all
launch: test_app_manager/test_app.xml
interface: test_app_manager/test_app.interface
# plugin definitions
plugins:
  - name: mail_notifier_plugin  # name to identify this plugin
    type: app_notifier/mail_notifier_plugin  # plugin type
    launch_args:  # arguments for plugin launch file
      foo: hello
    launch_arg_yaml: /etc/mail_notifier_launch_arg.yaml  # argument yaml file for plugin launch file
    # in this case, these arguments will be passed.
    # {"hoge": 100, "fuga": 30, "bar": 10} will be passed to start plugin
    # {"hoge": 50, "fuga": 30} will be passed to stop plugin
    plugin_args:  # arguments for plugin function
      hoge: 10
      fuga: 30
    start_plugin_args:  # arguments for start plugin function
      hoge: 100  # arguments for start plugin function arguments (it overwrites plugin_args hoge: 10 -> 100)
      bar: 10
    stop_plugin_args:  # arguments for stop plugin function
      hoge: 50  # arguments for stop plugin function arguments (it overwrites plugin_args hoge: 10 -> 50)
    plugin_arg_yaml: /etc/mail_notifier_plugin_arg.yaml  # argument yaml file for plugin function arguments
  - name: rosbag_recorder_plugin  # another plugin
    type app_recorder/rosbag_recorder_plugin
    launch_args:
      rosbag_path: /tmp
      rosbag_title: test.bag
      compress: true
      rosbag_topic_names:
        - /rosout
        - /tf
        - /tf_static
plugin_order: # plugin running orders. if you don't set field, plugin will be run in order in plugins field
  start_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin  # 1st plugin name
    - mail_notifier_plugin  #2nd plugin name
  stop_plugin_order:  # start plugin running order
    - rosbag_recorder_plugin
    - mail_notifier_plugin

Sample plugin repository is knorth55/app_manager_utils.

For more detailed information, please read #25.

Maintainer

Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>

CHANGELOG

Changelog for package app_manager

1.3.0 (2021-11-08)

  • update setuptools to follow noetic migration guide (#36)
  • app_manager cannot start app after failing app #42 (#42)
    • set current_app None when start failed
    • add test_start_fail.test
    • need catch error on _stop_current()
    • add test_start_fail.test test to check #42, app_manager cannot start app after failing app
  • add test to check if we forget catkin_install_python (#44)
    • call app_manager/appA with python2/python3 with ROS_PYTHON_VERSION
    • use catkin_install_python for noetic
    • add test to check if we forget to use catkin_install_python
  • add_rostest(test/test_plugin.test) (#45)
    • run rosdep install in devel_create_tasks.Dockerfile
    • update to format3 and install python-rosdep
    • use port 11313 for app_manager in test_plugin.test
    • add_rostest(test/test_plugin.test)
  • add more test code (#41
    • show more error messages
    • default return value of plugin_order must be list
    • plugins: \'launch_args\', \'plugin_args\', \'start_plugin_args\', \'stop_plugin_args\' must be dict, not list
    • test_plugin: add test to check plugins
    • use list(self.subs.items()) instead of self.subs.items()
    • Error processing request: \'>\' not supported between instances of \'NoneType\' and \'int\'
    • python3: AttributeError: \'dict\' object has no attribute \'iteritems\'
    • add test for list_apps/stop_app, add test_stop_app.py
    • python3: AttributeError: \'dict\' object has no attribute \'iterkeys\'
    • add 2to3 in CHECK_PYTHON3_COMPILE
    • add test/test_app.test
    • test/resources/example-moin.launch: use arg launch_prefox to select if we use xterm or not
  • add arguments in StartAppRequest (#27)
    • use req.args for launch args in app_manager.py
    • add args in StartApp srv
  • do not run stop_app when _stopping is true (#38)
  • fix travis build (#39)
    • fix typo in .travis.yml
    • run with full path
    • add CHECK_PYTHON2_COMPILE and CHECK_PYTHON3_COMPILE tests
  • use plugins as instance / use normal method in app_manager_plugin (#37)
  • set stopped true in app timeout (#31)
  • use system python to check python3 compileall (#34)
  • Contributors: Kei Okada, Shingo Kitagawa

1.2.0 (2021-03-03)

  • Merge pull request #29 from knorth55/add-stopped
  • Merge pull request #28 from knorth55/add-timeout
  • Merge pull request #30 from knorth55/add-all-availables add available_apps in all platform apps
  • add available_apps in all platform apps
  • add stopped context in app_manager plugin
  • add timeout field in app file
  • add enable_app_replacement param in app_manager (#26) This allows for both behaviors (replace currently running app or error out) and let\'s users choose without changing code...
  • add noetic test and also checks python 2/3 compatibility (#24)

    • add noetic test and also checks python 2/3 compatibility
    • fix to support both python 2/3

    * use rospy.log** instead of print Co-authored-by: Shingo Kitagawa <shingogo@hotmail.co.jp>

  • Add app manager plugin (#25) Enable aspect-oriented modelling, e.g.

    • send a mail when someone starts an app
    • auto-record rosbags during app run

    - auto-upload files on app-close ... - start plugin launch in app_manager - start and stop plugin function - pass app in plugin functions - add exit_code in stop_plugin_attr - stop plugin functions when shutdown is called - launch when plugin - load plugin launch when it exists - use ctx instead of exit_code - pass exit_code to ctx - add plugins in AppDefinition - add _current_plugins and _plugin_context - pass launch arguments - add plugin_args for app plugins - overwrite roslaunch.config.load_config_default for kinetic - add __stop_current for shutdown and __stop_current - support \"module: null\" syntax for app definition - add app_manager plugin base class - refactor scripts/app_manager - add start_plugin_args and stop_plugin_args - add start_plugin_arg_yaml and stop_plugin_arg_yaml - add launch_arg_yaml - add plugin_order to set plugin order - update readme to add plugin doc - update readme to add app definitions

  • fix readme (#23)

  • add exit_code log in app_manager (#22) add exit_code log in app_manager During successful execution, [dead_list]{.title-ref} should always end up empty.

  • add all platform for all robots (#17) add an additional keyword to explicitly support \'all\' platforms

  • use rospack to search for app_manager app_dir (#19)

    • use rospack to search for app_manager app_dir
    • remove unused imports
    • use both --applist and plugin app_dir
  • Merge pull request #20 from knorth55/fix-print-python3 use rospy.logerr to escape print error in python3

  • use rospy.logerr to escape print error in python3

  • Contributors: Kei Okada, Michael G

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • test/resources/example-min.launch
      • launch_prefix [default: xterm -e]
  • launch/app_manager.launch
      • master [default: true] — launch master if enabled
      • master_address [default: localhost] — address for app_manager master
      • master_port [default: 11313] — port for app_manager master
      • sigint_timeout [default: 15.0] — Time between sending sigint and sending sigterm to ROSLaunchParent
      • sigterm_timeout [default: 2.0] — Time between sending sigterm and sending sigkill to ROSLaunchParent
      • use_applist [default: false] — load apps from applist argument
      • applist [default: ] — app dirs (space separated)
      • respawn [default: false] — respawn app_manager
      • enable_app_replacement [default: true] — Enable app replacement by running another app, or not
      • enable_topic_remapping [default: true] — Enable name remapping of topic written in interface to app_manager namespace , or not
      • app_manager_args [default: --applist $(arg applist)]
      • app_manager_args [default: ]
  • test/plugin/sample_node.xml
      • param1 [default: param1]
      • param2 [default: param2]
      • success [default: false]
      • fail [default: false]

Plugins

No plugins found.

Recent questions tagged app_manager at Robotics Stack Exchange