8 from std_msgs.msg
import String
16 account_info = rospy.get_param(
17 'account_info',
'/var/lib/robot/account.yaml')
19 if not ckey
or not csecret
or not akey
or not asecret:
24 consumer_secret=csecret,
25 access_token_key=akey,
26 access_token_secret=asecret)
32 rospy.loginfo(rospy.get_name() +
" sending %s",
33 ''.join([message]
if len(message) < 128
else message[0:128]+
'......'))
35 ret = self.
api.post_update(message)
37 rospy.loginfo(rospy.get_name() +
" receiving %s", ret)
40 if __name__ ==
'__main__':
41 rospy.init_node(
'rostwitter', anonymous=
True)