Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 40

Can't make "getParams" work in C++

$
0
0
I'm able to set params but when I get them, it returns success with the wrong value. double myDouble = 7.7; _node.setParam("/my_double", myDouble); double myDoubleFromRos; std::cout << "get success = " << _node.getParam("/my_double", myDoubleFromRos) << " get value = " << myDoubleFromRos << " value should be = " << myDouble << std::endl; The output of this is: get success = 1 get value = 6.95333e-310 value should be = 7.7 On the command line I type: rosparam get "/my_double" > 7.7 So I'm successfully setting the parameter but I'm not able to get it. I'm fairly new to ROS so there must be some assumption I'm missing. Any advice would be greatly appreciated. Using fuerte-desktop-full latest.

Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>