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

Revision history [back]

Create msg file "geometry_msgs_vector.msg" in "msg" directory of ur package. In msg file write

geometry_msgs::PoseStamped [] msgs_vector

In ur code write the subscriber like this void callback(package_name::geometry_msgs_vector::ConstPtr &msg) {

}

To access the vector use "msg.msgs_vector"

Hope this works

PS:Dont forget to include this msg header file "package_name/geometry_msgs_vector.h" and they might be some syntactical error in the code i have mentioned but the logic is correct

Create msg file "geometry_msgs_vector.msg" in "msg" directory of ur package. In msg file write

geometry_msgs::PoseStamped [] msgs_vector

In ur code write the subscriber like this void callback(package_name::geometry_msgs_vector::ConstPtr callback(const package_name::geometry_msgs_vector::ConstPtr &msg) {

}

To access the vector use "msg.msgs_vector"

Hope this works

PS:Dont forget to include this msg header file "package_name/geometry_msgs_vector.h" and they might be some syntactical error in the code i have mentioned but the logic is correct