ros::NodeHandle nh; std::string param_value; nh.getParam("my_parameter", param_value);
ros::NodeHandle nh; nh.setParam("my_parameter", 42);
ros::NodeHandle nh; if (nh.hasParam("my_parameter")) { // Do something if the parameter exists }In this example, the `hasParam` method of the NodeHandle instance is used to check if a parameter named "my_parameter" exists. The package library for NodeHandle param is the ros::NodeHandle package.