Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/sick_safetyscanners2/SickSafetyscanners.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,20 @@ class SickSafetyscanners {
std::string sensor_ip;
node.template get_parameter<std::string>("sensor_ip", sensor_ip);
RCLCPP_INFO(getLogger(), "sensor_ip: %s", sensor_ip.c_str());
m_config.m_sensor_ip = boost::asio::ip::address_v4::from_string(sensor_ip);
m_config.m_sensor_ip = boost::asio::ip::make_address_v4(sensor_ip);

std::string interface_ip;
node.template get_parameter<std::string>("interface_ip", interface_ip);
RCLCPP_INFO(getLogger(), "interface_ip: %s", interface_ip.c_str());
m_config.m_interface_ip =
boost::asio::ip::address_v4::from_string(interface_ip);
boost::asio::ip::make_address_v4(interface_ip);

std::string host_ip;
node.template get_parameter<std::string>("host_ip", host_ip);
RCLCPP_INFO(getLogger(), "host_ip: %s", host_ip.c_str());
// TODO check if valid IP?
m_config.m_communications_settings.host_ip =
boost::asio::ip::address_v4::from_string(host_ip);
boost::asio::ip::make_address_v4(host_ip);

int host_udp_port;
node.template get_parameter<int>("host_udp_port", host_udp_port);
Expand Down
2 changes: 1 addition & 1 deletion src/SickSafetyscanners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ rcl_interfaces::msg::SetParametersResult SickSafetyscanners::parametersCallback(
m_config.m_frame_id = param.value_to_string();
} else if (param.get_name() == "host_ip") {
m_config.m_communications_settings.host_ip =
boost::asio::ip::address_v4::from_string(param.value_to_string());
boost::asio::ip::make_address_v4(param.value_to_string());
update_sensor_config = true;
} else if (param.get_name() == "host_udp_port") {
m_config.m_communications_settings.host_udp_port = param.as_int();
Expand Down