Open girimugundankumar opened 7 months ago
void UdpReceiverNode::get_params() { try { m_ip = declare_parameter("ip", ""); } catch (rclcpp::ParameterTypeException & ex) { RCLCPP_ERROR(get_logger(), "The ip paramter provided was invalid"); throw ex; }
try { m_port = declare_parameter("port", 0); } catch (rclcpp::ParameterTypeException & ex) { RCLCPP_ERROR(get_logger(), "The port paramter provided was invalid"); throw ex; }
RCLCPP_INFO(get_logger(), "ip: %s", m_ip.c_str()); RCLCPP_INFO(get_logger(), "port: %i", m_port); }
this does not pass a string and an int as expected? I hard coded the ip and port and got it to work. Did anyone face the same issue?
void UdpReceiverNode::get_params() { try { m_ip = declare_parameter("ip", "");
} catch (rclcpp::ParameterTypeException & ex) {
RCLCPP_ERROR(get_logger(), "The ip paramter provided was invalid");
throw ex;
}
try { m_port = declare_parameter("port", 0);
} catch (rclcpp::ParameterTypeException & ex) {
RCLCPP_ERROR(get_logger(), "The port paramter provided was invalid");
throw ex;
}
RCLCPP_INFO(get_logger(), "ip: %s", m_ip.c_str()); RCLCPP_INFO(get_logger(), "port: %i", m_port); }
this does not pass a string and an int as expected? I hard coded the ip and port and got it to work. Did anyone face the same issue?