Plugins and nodes to save notification to json file and pass it to app_notifier
This plugin saves notification via service call.
None
json_path
: JSON path
plugins:
- name: service_notification_saver
type: app_notification_saver/service_notification_saver
launch_args:
json_path: /tmp/app_notification.json
You can save app notification with service call.
rosservice call /service_notification_saver/save_app_notification "title: 'object recognition'
stamp:
secs: 1627467479
nsecs: 13279914
location: 'kitchen'
message: 'Dish is found'"
You can also clear app notification.
rosservice call /service_notification_saver/clear_app_notification "{}"
This plugin saves notification via service call.
None
json_path
: JSON pathsmach_status_topic
: SMACH status topic name
plugins:
- name: smach_notification_saver
type: app_notification_saver/smach_notification_saver
launch_args:
json_path: /tmp/app_notification.json
smach_status_topic: /server_name/smach/container_status
Save notification node via service call.
-
~save_app_notification
(app_notification_saver/SaveAppNotification
)Service to save app notification to JSON.
-
~clear_app_notification
(std_srvs/Empty
)Service to clear app notification in JSON.
-
~json_path
(String
, default:/tmp/app_notification.json
)Path to json file which contains app notification
roslaunch app_notification_saver service_notification_saver.launch
You can save app notification with service call.
rosservice call /service_notification_saver/save_app_notification "title: 'object recognition'
stamp:
secs: 1627467479
nsecs: 13279914
location: 'kitchen'
message: 'Dish is found'"
You can also clear app notification.
rosservice call /service_notification_saver/clear_app_notification "{}"
The sample output of the json file is like below:
{
"object recognition": [
{
"date": "2021-07-28T19:17:59",
"message": "Dish is found",
"location": "kitchen"
},
{
"date": "2021-07-28T19:18:09",
"message": "Cup is found",
"location": "kitchen"
}
],
"navigation failure": [
{
"date": "2021-07-28T19:18:29",
"message": "Stucked in front of the chair",
"location": "living room"
}
]
}
Save notification of smach state.
-
~smach/container_status
(smach_msgs/SmachContainerStatus
, default:/server_name/smach/container_status
)Smach status topic
-
~json_path
(String
, default:/tmp/app_notification.json
)Path to json file which contains app notification
# Launch only smach_notification_saver node
roslaunch app_notification_saver smach_notification_saver.launch
# Sample
# Launch smach_notification_saver node and rosbag
roslaunch app_notification_saver sample_smach_notification_saver.launch --screen