Publishing to speech topic on the Nao.
I am trying to publish to the speech topic on using the nao_driver package. What did I miss out?
#! /usr/bin/env python
import rospy
from std_msgs.msg import String
from dynamic_reconfigure.server import Server as ReConfServer
from nao_driver.cfg import nao_speechConfig as NodeConfig
from nao_driver import NaoNode
from naoqi import (ALBroker, ALProxy, ALModule)
from std_srvs.srv import( Empty, EmptyResponse )
from nao_msgs.msg import( WordRecognized )
def talker():
pub = rospy.Publisher('speech', String)
rospy.init_node('talker')
while not rospy.is_shutdown():
str = "hello world %s" % rospy.get_time()
rospy.loginfo(str)
pub.Publish(String(str))
rospy.sleep(1.0)
if __name__=='__main__':
try:
talker()
except rospy.ROSInterruptException:
pass
The output on the console:
No handlers could be found for logger "rosout"
This is looking good. Is the nao_speech node running and volume turned up? Check that your node properly connects to nao_speech with `rqt_graph`. Afaik you can ignore the "No handlers can be found..." error.
I tried to do this but the robot takes a lot of time to respond. I created a loop for publishing hello world over the speech topic and the robot responds very late the the first few hello worlds. Can u please help me? http://answers.ros.org/question/171331/real-nao-robot-responding-very-slow-to-the-topic-published-with-ros/