Skip to content

Commit 9264a31

Browse files
committed
add app_manager_utils in jsk_common
1 parent dbefb4c commit 9264a31

File tree

100 files changed

+3155
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+3155
-0
lines changed

app_manager_utils/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# app_manager_utils
2+
3+
## Dependency
4+
5+
- [PR2/app_manager kinetic-devel branch](https://github.com/PR2/app_manager)
6+
- [python-dateutil >= 2.7.0](https://github.com/dateutil/dateutil)
7+
8+
## app_scheduler
9+
10+
Scheduler for `app_manager`
11+
12+
For detailed information, please read [app_scheduler](app_scheduler/README.md).
13+
14+
## app_recorder
15+
16+
Recorder plugin for `app_manager`
17+
18+
For detailed information, please read [app_recorder](app_recorder/README.md).
19+
20+
## app_uploader
21+
22+
Uploader plugin for `app_manager`
23+
24+
For detailed information, please read [app_uploader](app_uploader/README.md).
25+
26+
## app_notifier
27+
28+
Notifier plugin for `app_manager`
29+
30+
For detailed information, please read [app_notifier](app_notifier/README.md).
31+
32+
## app_notification_saver
33+
34+
Notification saver plugin for `app_manager`
35+
36+
For detailed information, please read [app_notification_saver](app_notification_saver/README.md).
37+
38+
## app_publisher
39+
40+
Publisher plugin for `app_manager`
41+
42+
For detailed information, please read [app_publisher](app_publisher/README.md).
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2+
Changelog for package app_manager_utils
3+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
5+
0.0.6 (2022-07-29)
6+
------------------
7+
8+
0.0.5 (2022-02-08)
9+
------------------
10+
11+
0.0.4 (2021-12-27)
12+
------------------
13+
14+
0.0.3 (2021-12-17)
15+
------------------
16+
17+
0.0.2 (2021-12-11)
18+
------------------
19+
20+
0.0.1 (2021-10-06)
21+
------------------
22+
* Merge pull request `#26 <https://github.com/knorth55/app_manager_utils/issues/26>`_ from 708yamaguchi/app-publisher
23+
Add rostopic_publisher_plugin
24+
* Add rostopic_publisher_plugin
25+
* remove app_manager_plugin package
26+
* Merge pull request `#7 <https://github.com/knorth55/app_manager_utils/issues/7>`_ from knorth55/add-plugins
27+
* update app_manager_utils package.xml
28+
* Merge pull request `#3 <https://github.com/knorth55/app_manager_utils/issues/3>`_ from knorth55/add-app-manager-plugin
29+
* add test_app_manager package
30+
* use exec_depend
31+
* add build_depend
32+
* initial commit
33+
* Contributors: Naoya Yamaguchi, Shingo Kitagawa
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(app_manager_utils)
3+
find_package(catkin REQUIRED)
4+
catkin_metapackage()
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0"?>
2+
<package format="2">
3+
<name>app_manager_utils</name>
4+
<version>2.2.12</version>
5+
<description>The app_manager_utils meta package</description>
6+
<maintainer email="[email protected]">Shingo Kitagawa</maintainer>
7+
<author email="[email protected]">Shingo Kitagawa</author>
8+
<license>BSD</license>
9+
10+
<buildtool_depend>catkin</buildtool_depend>
11+
<exec_depend>app_notification_saver</exec_depend>
12+
<exec_depend>app_notifier</exec_depend>
13+
<exec_depend>app_publisher</exec_depend>
14+
<exec_depend>app_recorder</exec_depend>
15+
<exec_depend>app_scheduler</exec_depend>
16+
<exec_depend>app_uploader</exec_depend>
17+
18+
<export>
19+
<metapackage />
20+
</export>
21+
</package>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2+
Changelog for package app_notification_saver
3+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
5+
0.0.6 (2022-07-29)
6+
------------------
7+
8+
0.0.5 (2022-02-08)
9+
------------------
10+
11+
0.0.4 (2021-12-27)
12+
------------------
13+
14+
0.0.3 (2021-12-17)
15+
------------------
16+
17+
0.0.2 (2021-12-11)
18+
------------------
19+
20+
0.0.1 (2021-10-06)
21+
------------------
22+
* add python-dateutil in package.xml
23+
* update app_notification_saver/README.md
24+
* update app_notification_saver/README.md
25+
* update app_notification_saver/README.md
26+
* add json_path arg in smach_notification_saver.launch
27+
* add json_path arg in service_notification_saver.launch
28+
* Merge pull request `#18 <https://github.com/knorth55/app_manager_utils/issues/18>`_ from 708yamaguchi/add-smach-notification
29+
* Do not update json if active_states is empty
30+
* Move sample_smach_notification_saver.launch to sample directory
31+
* Update README.md using sample_smach_notification_saver
32+
* Split sample_smach_notification_server and smach_notification_server
33+
* Add smach_notification_saver plugin to yaml
34+
* add usage of smach_notification_saver
35+
* Add arg to use rosbag in smach_notification_saver.launch
36+
* Add sample rosbag which contains smach topics
37+
* Add smach_notification_saver to notify smach states
38+
* Use roslaunch instead of rosrun in README usage
39+
* flake8
40+
* import from __init\_\_
41+
* rename to app_notification_saver_base.py
42+
* add app_notification_saver_plugin
43+
* add executable in node_scripts
44+
* app_notification_saver as python package
45+
* Fix typo in README.md
46+
* Set language for code block
47+
* Add location field to notification
48+
* Update README.md
49+
* Use title field instead of type field because of python reserved word
50+
* Make base class AppNotificationSaver
51+
* Add json sample to README
52+
* Add app_notification_saver to pass messages to app_notifier
53+
* Contributors: Naoya Yamaguchi, Shingo Kitagawa
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(app_notification_saver)
3+
4+
find_package(catkin REQUIRED COMPONENTS
5+
message_generation
6+
rospy
7+
)
8+
9+
add_service_files(
10+
FILES SaveAppNotification.srv
11+
)
12+
13+
catkin_python_setup()
14+
15+
generate_messages()
16+
17+
catkin_package(
18+
CATKIN_DEPENDS message_runtime
19+
)
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# app_notification_saver
2+
3+
Plugins and nodes to save notification to json file and pass it to `app_notifier`
4+
5+
## `app_manager` plugins
6+
7+
### `app_notification_saver/service_notification_saver`: General notification saver plugin
8+
9+
This plugin saves notification via service call.
10+
11+
#### `plugin_args`: Plugin arguments
12+
13+
`None`
14+
15+
#### `launch_args`: Plugin launch arguments
16+
17+
- `json_path` : JSON path
18+
19+
#### Sample plugin description
20+
21+
```yaml
22+
plugins:
23+
- name: service_notification_saver
24+
type: app_notification_saver/service_notification_saver
25+
launch_args:
26+
json_path: /tmp/app_notification.json
27+
```
28+
29+
#### Save app notification
30+
31+
You can save app notification with service call.
32+
33+
```bash
34+
rosservice call /service_notification_saver/save_app_notification "title: 'object recognition'
35+
stamp:
36+
secs: 1627467479
37+
nsecs: 13279914
38+
location: 'kitchen'
39+
message: 'Dish is found'"
40+
```
41+
42+
#### Clear app notification
43+
44+
You can also clear app notification.
45+
46+
```bash
47+
rosservice call /service_notification_saver/clear_app_notification "{}"
48+
```
49+
50+
### `app_notification_saver/smach_notification_saver`: SMACH notification saver plugin
51+
52+
This plugin saves notification via service call.
53+
54+
#### `plugin_args`: Plugin arguments
55+
56+
`None`
57+
58+
#### `launch_args`: Plugin launch arguments
59+
60+
- `json_path` : JSON path
61+
- `smach_status_topic`: SMACH status topic name
62+
63+
#### Sample plugin description
64+
65+
```yaml
66+
plugins:
67+
- name: smach_notification_saver
68+
type: app_notification_saver/smach_notification_saver
69+
launch_args:
70+
json_path: /tmp/app_notification.json
71+
smach_status_topic: /server_name/smach/container_status
72+
```
73+
74+
## Nodes
75+
76+
### `service_notification_saver_node.py`: Node for general notification saver
77+
78+
Save notification node via service call.
79+
80+
#### Services
81+
82+
- `~save_app_notification` (`app_notification_saver/SaveAppNotification`)
83+
84+
Service to save app notification to JSON.
85+
86+
- `~clear_app_notification` (`std_srvs/Empty`)
87+
88+
Service to clear app notification in JSON.
89+
90+
#### Parameters
91+
92+
- `~json_path` (`String`, default: `/tmp/app_notification.json`)
93+
94+
Path to json file which contains app notification
95+
96+
#### Sample
97+
98+
##### Launch service_notification_saver node
99+
100+
```bash
101+
roslaunch app_notification_saver service_notification_saver.launch
102+
```
103+
104+
##### Save app notification
105+
106+
You can save app notification with service call.
107+
108+
```bash
109+
rosservice call /service_notification_saver/save_app_notification "title: 'object recognition'
110+
stamp:
111+
secs: 1627467479
112+
nsecs: 13279914
113+
location: 'kitchen'
114+
message: 'Dish is found'"
115+
```
116+
117+
##### Clear app notification
118+
119+
You can also clear app notification.
120+
121+
```bash
122+
rosservice call /service_notification_saver/clear_app_notification "{}"
123+
```
124+
125+
##### Check output JSON
126+
127+
The sample output of the json file is like below:
128+
129+
```json
130+
{
131+
"object recognition": [
132+
{
133+
"date": "2021-07-28T19:17:59",
134+
"message": "Dish is found",
135+
"location": "kitchen"
136+
},
137+
{
138+
"date": "2021-07-28T19:18:09",
139+
"message": "Cup is found",
140+
"location": "kitchen"
141+
}
142+
],
143+
"navigation failure": [
144+
{
145+
"date": "2021-07-28T19:18:29",
146+
"message": "Stucked in front of the chair",
147+
"location": "living room"
148+
}
149+
]
150+
}
151+
```
152+
153+
### `smach_notification_saver_node.py`: Node for SMACH notification saver
154+
155+
Save notification of smach state.
156+
157+
#### Subscribe topics
158+
159+
- `~smach/container_status` (`smach_msgs/SmachContainerStatus`, default: `/server_name/smach/container_status`)
160+
161+
Smach status topic
162+
163+
#### Parameters
164+
165+
- `~json_path` (`String`, default: `/tmp/app_notification.json`)
166+
167+
Path to json file which contains app notification
168+
169+
#### Sample
170+
171+
##### Launch smach_notification_saver node
172+
173+
```bash
174+
# Launch only smach_notification_saver node
175+
roslaunch app_notification_saver smach_notification_saver.launch
176+
177+
# Sample
178+
# Launch smach_notification_saver node and rosbag
179+
roslaunch app_notification_saver sample_smach_notification_saver.launch --screen
180+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: app_notification_saver/service_notification_saver
2+
launch: app_notification_saver/service_notification_saver.launch
3+
module: null
4+
- name: app_notification_saver/smach_notification_saver
5+
launch: app_notification_saver/smach_notification_saver.launch
6+
module: null
8.7 KB
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<launch>
2+
<!-- start: arguments -->
3+
<arg name="json_path" default="/tmp/app_notification.json" />
4+
<!-- end: arguments -->
5+
6+
<node name="service_notification_saver" pkg="app_notification_saver"
7+
type="service_notification_saver_node.py">
8+
<rosparam subst_value="true">
9+
json_path: $(arg json_path)
10+
</rosparam>
11+
</node>
12+
</launch>

0 commit comments

Comments
 (0)