Skip to content

Commit

Permalink
Add header to TegaAction messages that we send
Browse files Browse the repository at this point in the history
  • Loading branch information
jakory committed Aug 25, 2017
1 parent c03bd87 commit 312312c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/tega_teleop_ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ def send_motion_message(self, motion):
if self.tega_pub is not None:
print 'sending motion message: %s' % motion
msg = TegaAction()
# add header
msg.header = Header()
msg.header.stamp = rospy.Time.now()
msg.motion = motion
self.tega_pub.publish(msg)
rospy.loginfo(msg)
Expand All @@ -97,6 +100,9 @@ def send_lookat_message(self, lookat):
if self.tega_pub is not None:
print 'sending lookat message: %s' % lookat
msg = TegaAction()
# add header
msg.header = Header()
msg.header.stamp = rospy.Time.now()
msg.do_look_at = True
msg.look_at = lookat
self.tega_pub.publish(msg)
Expand All @@ -107,6 +113,9 @@ def send_speech_message(self, speech):
if self.tega_pub is not None:
print '\nsending speech message: %s' % speech
msg = TegaAction()
# add header
msg.header = Header()
msg.header.stamp = rospy.Time.now()
msg.wav_filename = speech
self.tega_pub.publish(msg)
rospy.loginfo(msg)
Expand All @@ -116,6 +125,9 @@ def send_fidget_message(self, fidget):
if self.tega_pub is not None:
print '\nsending fidget message: %s' % fidget
msg = TegaAction()
# add header
msg.header = Header()
msg.header.stamp = rospy.Time.now()
msg.fidgets = fidget
self.tega_pub.publish(msg)
rospy.loginfo(msg)
Expand All @@ -125,6 +137,9 @@ def send_volume_message(self, volume):
if self.tega_pub is not None:
print '\nsending volume message: %s' % volume
msg = TegaAction()
# add header
msg.header = Header()
msg.header.stamp = rospy.Time.now()
msg.set_volume = True
msg.percent_volume = volume
self.tega_pub.publish(msg)
Expand Down

0 comments on commit 312312c

Please sign in to comment.