YAML File Not Loading files
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
<node name="my_node" pkg="my_package" type="my_node" output="screen">
<rosparam file="$(find my_packge)/launch/yaml_file.yaml"/>
</node>
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?