GithubHelp home page GithubHelp logo

app_manager's Introduction

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 <[email protected]>

app_manager's People

Contributors

708yamaguchi avatar affonso-gui avatar furushchev avatar k-okada avatar knorth55 avatar nakane11 avatar takayuki5168 avatar theclearpathdash avatar thedash avatar v4hn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app_manager's Issues

Release request because `StopApp.srv` is updated from 1.3.0

1.3.0 is released on 2021-11-08.
After that, type of StopApp.srv is updated at 0ea3cd0

If there is a new release which includes this change for ROS melodic, it is convenient for me, so I write this issue.
However, it is no problem for me to clone current source code to my local PC, so if this issue is inappropriate, I’m sorry.

My use case is as follows:
I use ROS melodic.
I clone this package (source, kinetic-devel) into a robot’s PC and launch app_manager.launch.
And then, I send service calls like /start_app, and /stop_app from my local PC.
My local PC downloads ros-melodic-app-manager (1.3.0) using package.xml from https://github.com/jsk-ros-pkg/jsk_robot/blob/master/jsk_naoqi_robot/jsk_pepper_startup/package.xml#L34

leus@leus-ThinkStation-P320-Tiny:~$ apt-show-versions ros-melodic-app-manager
ros-melodic-app-manager:amd64/bionic 1.3.0-1bionic.20221025.191928 uptodate

I always forgot this, and got this error when sending /stop_app from my remote PC.

leus@leus-ThinkStation-P320-Tiny:~$ rosservice call /olive/stop_app "name: 'jsk_pepper_startup/meeting
ERROR: unable to connect to service: remote error reported: request from [/rosservice_6193_1671675771529]: md5sums do not match: [57711838d4a1faddc5043a742845018b] vs. [2928701776066f558a5952fd46f1e53e]```

Thanks in advance.

missing appmaster in install

@TheDash
I wonder why this repository has appmaster executable in bin directory, which is omitted to install in CMakeLists.txt.
This program is indispensable for users.

app_manager cannot start app after failing app

after failing app, app_manager cannot start app

[rosout][INFO] 2021-10-25 08:43:00,316: start_app: jsk_robot_startup/check_use_sim_time
[rosout][INFO] 2021-10-25 08:43:00,316: Loading app: jsk_robot_startup/check_use_sim_time
[rosout][INFO] 2021-10-25 08:43:01,912: Launching: /home/applications/ros/indigo/src/jsk-ros-pkg/jsk_robot/jsk_robot_common/jsk_robot_startup/apps/check_use_sim_time/check_use_sim_time.xml
[roslaunch][INFO] 2021-10-25 08:43:01,914: loading roscore config file /opt/ros/indigo/etc/ros/roscore.xml
[rosout][ERROR] 2021-10-25 08:43:01,915: app start failed
1635118981.916126966 INFO [app_scheduler.py:128(_sub_cb) [topics: /pr1040/application/app_status, /rosout] app_scheduler: app start failed
1635118981.916523933 ERROR [app_scheduler.py:68(start_job) [topics: /pr1040/application/app_status, /rosout] Failed to start app: check_use_sim_time, jsk_robot_startup/check_use_sim_time
1635118981.916713953 ERROR [app_scheduler.py:70(start_job) [topics: /pr1040/application/app_status, /rosout] StartApp error code: 500
1635118981.916915893 ERROR [app_scheduler.py:72(start_job) [topics: /pr1040/application/app_status, /rosout] StartApp error message: internal error [[Errno 24] Too many open files]

cc. @Kanazawanaoaki @tkmtnt7000

Release request: 1.1.1

We need this commit to install launch dir correctly.
Also, latest kinetic version is 1.0.5, and we need 1.1.1 for kinetic, too.
7fa0929

just an idea: function of displaying doc of demo with rosservice

We can execute some demos as apps with this app_manager. But sometimes there are many procedures to do demo. For example, when we want to diabolo demo, we have to know what we prepare(designated diabolo and its sticks), how PR2 hold sticks(with our help? or not), ...

So I think that each demo there should be a doc to write what we prepare, what to help or what to attend when executing demo. I want each app have doc.md, and we can read it with rosservice like rosservice call doc_app diabolo or with raw markdown file. With this, one who is not so new to one demo, he can execute it with this doc.

Can't run jog_control launch file.

Hello everyone,

I am on Ubuntu 18.04 LTS with ROS Melodic.
When I try to run jog_control(https://github.com/tork-a/jog_control) launch file using app_manager like below, but it can't.

$ rosservice call /robot/start_app jog_launch/i611
started: False
error_code: 500
message: "internal error [signal only works in main thread]"
namespace: ''

This is my .app file:

display: i611 Jog launch
description: i611 Jog launch
platform: i611
launch: jog_launch/i611.launch

Perhaps jog_control use SIGNAL function in it, but I think it is not special case.
Is it a limitation to use app_manager? Are there any way to run these launch file?

Thanks a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.