File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ namespace ur_robot_driver
3232DashboardClientROS::DashboardClientROS (const rclcpp::Node::SharedPtr& node, const std::string& robot_ip)
3333 : node_(node), client_(robot_ip)
3434{
35+ node_->declare_parameter <double >(" receive_timeout" , 1 );
3536 connect ();
3637
3738 // Service to release the brakes. If the robot is currently powered off, it will get powered on on the fly.
@@ -199,7 +200,9 @@ bool DashboardClientROS::connect()
199200{
200201 timeval tv;
201202 // Timeout after which a call to the dashboard server will be considered failure if no answer has been received.
202- tv.tv_sec = node_->declare_parameter <double >(" receive_timeout" , 1 );
203+ double time_buffer;
204+ node_->get_parameter (" receive_timeout" , time_buffer);
205+ tv.tv_sec = time_buffer;
203206 tv.tv_usec = 0 ;
204207 client_.setReceiveTimeout (tv);
205208 return client_.connect ();
You can’t perform that action at this time.
0 commit comments