Ask Your Question
0

nav_msgs::Path without the field "pose" ?!?!

asked 2014-11-05 14:42:56 -0500

Andromeda gravatar image

Hi, I m trying to compile a code but I cannot do that since I m getting the following error:

error: ‘nav_msgs::Path_<std::allocator<void> >::_poses_type’ has no member named ‘pose’

But in the API documentation it is reported to have such field. Furthermore I tried to echo another package not made by me and it outputs:

header: 
  seq: 25
  stamp: 
    secs: 1415216779
    nsecs: 703217309
  frame_id: map
poses: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1415216779
        nsecs: 703217309
      frame_id: map
    pose: 
      position: 
        x: 5.84004402161
        y: -0.0
        z: 0.0
      orientation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0

as you can see there is poses and pose. In my CMakeLists.txt I have already enable to compile for nav_msgs too. What could be?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2014-11-05 15:41:12 -0500

BlitherPants gravatar image

updated 2014-11-05 15:44:41 -0500

'Poses' is an array member of "Path" of type PoseStamped. Each PoseStamped has its own "pose" member (confusing, right?), so I think you should index it similar to the following:

some_path.poses[some_index].pose

http://docs.ros.org/api/nav_msgs/html...

edit flag offensive delete link more

Comments

Thanks...the small square brakets were difficult to see.

Andromeda gravatar image Andromeda  ( 2014-11-06 02:39:28 -0500 )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: 2014-11-05 14:42:56 -0500

Seen: 1,229 times

Last updated: Nov 05 '14