ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

roslib.message.get_message_class python node error

asked 2012-12-11 00:49:02 -0600

safzam gravatar image

updated 2012-12-11 01:03:43 -0600

Hi, I want to know the class of message giving message type via following one code line. I run this python node on(Fuerte/Ubuntu 12.04) and get following error while the same code does not give any error when I run it on (electric Ubuntu 10.04).

error:

msg_class = roslib.message.get_message_class(self.topic_type)
AttributeError: 'module' object has no attribute 'message'

Do I need to update roslib?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2012-12-11 01:09:11 -0600

You need to have the following import:

import roslib.message

(not just import roslib).

edit flag offensive delete link more

Comments

Thanks a lot

safzam gravatar image safzam  ( 2012-12-11 03:09:49 -0600 )edit
1

answered 2012-12-11 01:05:53 -0600

Lorenz gravatar image

roslib.message.get_message_class is definitely provided by Fuerte's roslib. Did you maybe just forget to import it?

import roslib.message
edit flag offensive delete link more

Comments

You beat me to it! :-)

Martin Günther gravatar image Martin Günther  ( 2012-12-11 01:09:44 -0600 )edit

Question Tools

Stats

Asked: 2012-12-11 00:49:02 -0600

Seen: 1,302 times

Last updated: Dec 11 '12