ros-drivers / transport_drivers

A set of ROS2 drivers for transport-layer protocols.
Apache License 2.0
93 stars 56 forks source link

Issue with socket parameters #99

Open girimugundankumar opened 7 months ago

girimugundankumar commented 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?