diff --git a/jsk_robot_common/jsk_robot_startup/scripts/smach_to_mail.py b/jsk_robot_common/jsk_robot_startup/scripts/smach_to_mail.py index 233511f0b4e..91cecb62f3d 100755 --- a/jsk_robot_common/jsk_robot_startup/scripts/smach_to_mail.py +++ b/jsk_robot_common/jsk_robot_startup/scripts/smach_to_mail.py @@ -82,6 +82,11 @@ def _status_cb(self, msg): rospy.logwarn("smach does not have DESCRIPTION, see https://github.com/jsk-ros-pkg/jsk_robot/tree/master/jsk_robot_common/jsk_robot_startup#smach_to_mailpy for more info") if 'IMAGE' in local_data_str and local_data_str['IMAGE']: rospy.loginfo("- image_str -> {}".format(local_data_str['IMAGE'][:64])) + if 'INFO' in local_data_str: + rospy.loginfo("- description_str -> {}".format(local_data_str['INFO'])) + else: + rospy.logwarn("smach does not have INFO, see https://github.com/jsk-ros-pkg/jsk_robot/tree/master/jsk_robot_common/jsk_robot_startup#smach_to_mailpy for more info") + # Store data for every callerid to self.smach_state_list[caller_id] caller_id = msg._connection_header['callerid'] @@ -157,6 +162,12 @@ def _send_mail(self, subject, state_list): image.img_data = x['IMAGE'] email_msg.body.append(image) email_msg.body.append(changeline) + if 'INFO' in x: + description = EmailBody() + description.type = 'text' + description.message = x['INFO'] + email_msg.body.append(description) + email_msg.body.append(changeline) # rospy.loginfo("body:{}".format(email_msg.body)) if subject: