[ros-users] cmd_vel topic has no attribute linear

Ken Conley kwc at willowgarage.com
Sun Apr 18 18:33:58 UTC 2010

Hi hitesh,

It would help if you cut and paste the exact error message and include a
sample program. I suspect that the program is using the subscriber object
instead of the message object, but this is hard to tell without more


On Apr 18, 2010 9:43 AM, "hitesh dhiman" <hitesh.dhiman.1988 at gmail.com>

Hi all,
I'm trying to subscribe to the cmd_vel message, According to the definition,
the message is of type Twist, with 2 vectors linear and angular.
My node to access this topic is in python.
For example, if the subscriber is vel = rospy.Subscriber("/cmd_vel", Twist)
if i try to print out vel.linear, it gives an attribute error, stating the
subscriber object has no attribute linear.

Any idea what I'm doing wrong here?

Hitesh Dhiman
Electrical Engineering
National University of Singapore

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
ros-users mailing list
ros-users at lists.sourceforge.net

ros-users mailing list
ros-users at code.ros.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100418/d3fca32b/attachment-0003.html>

More information about the ros-users mailing list