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

LocalPathPlanner PoseStamped [closed]

asked 2015-05-19 06:24:21 -0600

felixwatzlawik gravatar image

Hello Guys,

I want to use the data by the localpath planner. The Data Type is nav_msgs/Path and I am using with my node a pointer to get for example the x coordinate:

ROS_INFO("Data x [%f]", pathConstPtr->pose[i].pose.position.x);

Which works fine, but I have no idea how I can find out how many poses I have?

Are there some kind of methods to get the size of the posestamped?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by felixwatzlawik
close date 2015-05-19 06:53:23.369354

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-19 06:47:41 -0600

Erwan R. gravatar image

You can call the size() method on pathConstPtr->poses : arrays in messages are mainly handled as std::vector from cpp.

edit flag offensive delete link more


thaaaanks mate, saved me a lot of trouble :)

felixwatzlawik gravatar image felixwatzlawik  ( 2015-05-19 06:53:02 -0600 )edit

Question Tools

1 follower


Asked: 2015-05-19 06:24:21 -0600

Seen: 315 times

Last updated: May 19 '15