ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Using nao_leds to blink LEDs

asked 2014-02-24 22:06:44 -0600

dnth gravatar image

I cant seem to blink the leds on Nao using nao_leds. Does anyone knows how do I do it? I dont seem to really get the action goal stuff. Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-02-24 22:24:01 -0600

dnth gravatar image

This is what I worked out, but something is still missing.

import roslib; roslib.load_manifest('beginner_tutorials_naotalk')
import rospy

# Brings in the SimpleActionClient
import actionlib

import std_msgs.msg
import nao_msgs.msg
from nao_msgs.msg import *

def blink_client():
    client = actionlib.SimpleActionClient('blink', nao_msgs.msg.BlinkAction)
    #goal = actionlib_tutorials.msg.FibonacciGoal(colors.r=1, blink_rat_mean=1.5 ,blink_rate_sd=1.7 )
    #colors=[1,2,3,4], blink_rate_mean=1.5, blink_rate_sd=1.7
    goal=nao_msgs.msg.BlinkGoal(colors=(1,2,3,4), blink_rate_mean=1.5, blink_rate_sd=1.7)


    return client.get_result()

if __name__ == '__main__':
        result = blink_client()
        print "Result:", ', '.join([str(n) for n in result.sequence])
    except rospy.ROSInterruptException:
        print "program interrupted before completion"

Below is the error message

AttributeError: 'int' object has no attribute 'r'
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-02-24 22:06:44 -0600

Seen: 151 times

Last updated: Feb 24 '14