Ask Your Question
0

rospy.ServiceProxy( ) is not working

asked 2016-01-04 00:09:34 -0600

Hi there, I am incredibly new to ROS, and I am trying to learn by creating a program with turtlesim. I am currently writing a node that will call turtlesim's Spawn service, and I am getting an AttributeError: 'module' has not attribute 'ServiceProxy'.

Here is the code I have written:

#!/usr/bin/env python

from turtlesim.srv import Spawn
import rospy

def spawn():
    spawn_turtle = rospy.SerivceProxy('spawn_turtle', Spawn)
    spawn_turtle(50,50,10,"turt")
    rospy.spin()

if __name__ == "__main__":
    spawn()

Thank you so much for your help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-01-04 00:17:34 -0600

ahendrix gravatar image

I think you're misspelled ServiceProxy

edit flag offensive delete link more

Comments

You're right...thank you so much for pointing that out. I guess that's what happens when I am programming late at night.

alambert gravatar imagealambert ( 2016-01-04 18:32:28 -0600 )edit

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

Stats

Asked: 2016-01-04 00:09:34 -0600

Seen: 331 times

Last updated: Jan 04 '16