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

Use dynamic reconfiguration to set the parameter value in ROS

$
0
0
I am new to ROS and i want to use Dynamic reconfiguration technique to set a parameter (`rectangle_height`). Through internet i came across with the following method but its not working. **Problem:** when i run `rqt_reconfigure`, in that my node (visual_analysis) is not visual so i can't change the parameter. -In my **Includes**, i have included the following: #include #include #include -In my **`main()`** where my variable is declared, i have written the following: int main( ) { double rectangle_height; ///////////////////Dynamic Reconfig dynamic_reconfigure::ReconfigureRequest srv_req; dynamic_reconfigure::ReconfigureResponse srv_resp; dynamic_reconfigure::DoubleParameter double_param; dynamic_reconfigure::Config conf; //Entering values using Dynamic Reconfig double_param.name = "kurtana_pitch_joint"; double_param.value = rectangle_height; conf.doubles.push_back(double_param); srv_req.config = conf; ros::service::call("/visual_analysis/set_parameters", srv_req, srv_resp); return 0; }

Viewing all articles
Browse latest Browse all 126

Trending Articles