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

Error: invalid use of template-name ‘geometry_msgs::Pose_’ without an argument list

asked 2015-03-31 10:35:16 -0500

RosFan19 gravatar image

Hi,

I'm trying to create a method:

  geometry_msgs::Pose_::_orientation_type rotationVectorToQuaternion(geometry_msgs::PointStamped::_point_type rotVec, double angle) {

    geometry_msgs::Pose_::_orientation_type quaternion;
    return quaternion;

  }

To set value to:

geometry_msgs::PoseStamped poseStamped;
poseStamped.pose.orientation = rotationVectorToQuaternion(message, angle);

However i get this error:

error: invalid use of template-name ‘geometry_msgs::Pose_’ without an argument list
   geometry_msgs::Pose_::_orientation_type rotationVectorToQuaternion(geometry_msgs::PointStamped::_point_type rotVec, double angle)

This is a cpp thing, but I need some help with it.

edit retag flag offensive close merge delete

Comments

Do you have a good reason for using the internal types instead of just the normal message names?

dornhege gravatar image dornhege  ( 2015-03-31 12:46:48 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-03-31 11:57:12 -0500

aak2166 gravatar image

updated 2015-03-31 15:06:50 -0500

I believe the compiler would be looking for an object with type geometry_msgs::Pose not geometry_msgs::Pose_ if you #include<geometry_msgs/Pose.h>. Is there any particular reason why you are using the return type you are?

edit flag offensive delete link more

Comments

Yes that worked. The IDE offered me only the Pose_ one. Thanks for the help!

RosFan19 gravatar image RosFan19  ( 2015-04-01 06:19:23 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-31 10:35:16 -0500

Seen: 1,381 times

Last updated: Mar 31 '15