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

Make error on Twist.msg

asked 2012-02-06 14:22:55 -0600

GenePSmith gravatar image

updated 2014-01-28 17:11:17 -0600

ngrennan gravatar image

After editing my CMakeList and running a make on my package and I received an error I'm not sure how to fix. The error is:

roslib.msgs.MsgSpecException: Twist.msg: Duplicate field names in message: ['linear', 'x', 'y', 'z', 'angular', 'x', 'y', 'z'] make[3]: * [../msg_gen/cpp/include/movbotGPS/Twist.h] Error 1

I'v checked my Twist.msg file and I believe it's setup correctly:

Vector3 linear float64 x float64 y float64 z Vector3 angular float64 x float64 y float64 z

So I don't understand why I'm getting an error in "Duplicate field names in message". Can anyone explain?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-02-06 16:12:14 -0600

ahendrix gravatar image

updated 2012-02-08 06:57:11 -0600

Why are you creating your own copy of the Twist message?

You should declare a dependency on geometry_msgs and use the Twist message there.

EDIT:

You can add a dependency on geometry_msgs by adding a line like this to your manifest.xml:

<depend package="geometry_msgs"/>
edit flag offensive delete link more
0

answered 2012-02-08 06:21:07 -0600

GenePSmith gravatar image

Thank you for the help. However, since I have already created the package without listing geometry_msg as a dependency and I tried using rosdep to declare it (which didn't work), can you tell me how to correctly declare geometry_msg in my package?

edit flag offensive delete link more

Comments

I've added an example to my answer. Since this is a dependency on another ROS package, you want a normal dependency. rosdep is used for dependencies on external (system) packages.
ahendrix gravatar image ahendrix  ( 2012-02-08 06:58:26 -0600 )edit

Question Tools

Stats

Asked: 2012-02-06 14:22:55 -0600

Seen: 1,580 times

Last updated: Feb 08 '12