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

How can I find out the detailed API of messages?

asked 2011-08-16 14:58:59 -0500

gong gravatar image

updated 2014-01-28 17:10:13 -0500

ngrennan gravatar image

How can I find out the detailed API of messages?

Point, I can only find the definition here http://www.ros.org/doc/api/geometry_m... . However, there are many methods such as push_back and so on which are not mention in ros-wiki or ros-api. I think ros must have been befined some iterators and containers. So where are the document of API or source code?

Any suggestion would be appreciate. Best regards!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2011-08-16 20:21:27 -0500

Lorenz gravatar image

Message generation uses standard C++/Boost data types and containers when creating messages for C++. Variable size arrays are represented by std::vector, fixed size arrays are represented by boost:array. For more information on how to use these, please have a look at your favorite C++ API reference and the boost documentation.

You can find a complete list of data type mappings used in message generation here.

edit flag offensive delete link more

Comments

you provide a very important document. That have been solved my question. Thanks.
gong gravatar image gong  ( 2011-08-17 12:49:16 -0500 )edit
0

answered 2011-08-16 20:03:04 -0500

gong gravatar image

updated 2011-08-16 20:03:40 -0500

I attempt to use Point.pop(), the compiler give me an error. ERROR: 'class std::vector<geometry_msgs::point_<std::allocator<void>>, std::allocator<geometry_msgs::point_<std::allocator<void>>>' has no member named 'pop'.

In this case, Point as a datatype in container std::vector.

So, there must be some mechanism to encapsulate the datatype in ROS such as visualization_msgs::Marker. Where are they?

edit flag offensive delete link more

Comments

There is no pop() function in vector, only pop_back(). Here is a documentation of the vector class: http://en.cppreference.com/w/cpp/container/vector.
dornhege gravatar image dornhege  ( 2011-08-17 00:00:20 -0500 )edit
That's right. Thanks.
gong gravatar image gong  ( 2011-08-17 12:46:06 -0500 )edit

Question Tools

Stats

Asked: 2011-08-16 14:58:59 -0500

Seen: 1,412 times

Last updated: Aug 16 '11