-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for VINT networkhub to ROS2 #172
Conversation
This is a port of ros-drivers#127 to ROS2. Closes ros-drivers#135.
I could not test this PR because I don't have access to a VINT network hub. @patilunmesh, could you test this please? |
if (this->get_parameter("server_name", server_name_) && | ||
this->get_parameter("server_ip", server_ip_)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know much about the PhidgetNet_addServer
API. If you call it to set the server name, does it always take precedence over the serial_num
/hub_port
that is otherwise specified?
If that is the case, then I think we should print a warning or error if the serial_num/hub_port is specified to anything but the default. Also, I think that the RCLCPP_INFO
call below should probably conditionally print whether it is attaching to the server, or to the hub_port, depending on which one is configured. @mintar what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit I don't know the first thing about either the VINT serial hub nor the VINT network hub. I don't have either device for testing; that's what's making this so challenging even though it's really simple code.
In this PR, I've just ported the working code from #127 to ROS2. I haven't changed anything except replacing the ROS1 API calls with their ROS2 equivalents. Since we have this code in Noetic for a while now, and nobody has complained, I expect it's working.
You're definitely right about the RCLCPP_INFO call, but I believe somebody with access to a device for testing should make those changes.
@mintar I tested the code with a VINT hub using a temperature, humidity phidget and it is working!! |
@clalancette: Seems to be working as in Noetic. Do you think this is ready for merging? |
@clalancette: Can I merge this? |
This is a port of #127 to ROS2.
Closes #135.