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

YAML File Not Loading files

$
0
0
Folks, I created my a YAML file. When I change the parameters in my YAML, then don't change in my code. I created the yaml inside my launch folder: yaml_file.yaml > min_user_distance: 0.9 ... myClass.cpp class myClass { ros::NodeHandle nh_; public: myClass(int32_t user_id) : it_(nh_) { std::cout << "\n---------------------------\n"; std::cout << "Object Parameters (CAMERA):\n---------------------------\n"; //parameters from a YAML File nh_.param("min_user_distance", min_user_distance_, 0.9); std::cout << "min_user_distance = " << min_user_distance_ << "\n"; nh_.param("max_user_distance", max_user_distance_, 1.8); std::cout << "max_user_distance = " << max_user_distance_ << "\n"; } } And this is how I load the yaml in my my_launch_file. launch When I change the value in the yaml file, the computer still prints 0.9 for the min_user_distance_ (which is the default value). Why does it always pick the default value?

Viewing all articles
Browse latest Browse all 92


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