vector.cpp
Go to the documentation of this file.
1 #include <ros/ros.h>
2 #include <ros/console.h>
3 
4 #include <vector>
5 #include <iostream>
6 #include <algorithm>
7 
8 int main(int argc, char** argv){
9 
10  ros::init(argc, argv, "test");
11  ros::NodeHandle nh("~");
12 
13  std::vector<std::string> joints;
14 
15 
16  // following expression always returns empty vector, even if parameter exists and fully-qualified path for the parameter is valid
17  nh.param<std::vector<std::string>>("joints", joints, std::vector<std::string>());
18 
19 // std::cout << joints << std::endl;
20  std::for_each(
21  joints.cbegin(),
22  joints.cend(),
23  [] (const std::string c) {std::cout << c << " ";}
24  );
25 }
int main(int argc, char **argv)
Definition: vector.cpp:8


vapor_master
Author(s): RosHub Inc.
autogenerated on Mon Feb 28 2022 23:59:43