Skip to content
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

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

mintar
Copy link
Contributor

@mintar mintar commented Feb 16, 2024

This is a port of #127 to ROS2.

Closes #135.

@mintar
Copy link
Contributor Author

mintar commented Feb 16, 2024

I could not test this PR because I don't have access to a VINT network hub. @patilunmesh, could you test this please?

Comment on lines +70 to +71
if (this->get_parameter("server_name", server_name_) &&
this->get_parameter("server_ip", server_ip_))
Copy link
Contributor

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?

Copy link
Contributor Author

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 mintar changed the title Add support for VINT networkhub Add support for VINT networkhub to ROS2 Feb 20, 2024
@patilunmesh
Copy link

@mintar I tested the code with a VINT hub using a temperature, humidity phidget and it is working!!

@mintar
Copy link
Contributor Author

mintar commented Feb 21, 2024

@clalancette: Seems to be working as in Noetic. Do you think this is ready for merging?

@mintar
Copy link
Contributor Author

mintar commented Feb 28, 2024

@clalancette: Can I merge this?

@mintar mintar merged commit 6a6b81e into ros-drivers:rolling Mar 11, 2024
4 checks passed
@mintar mintar deleted the port-pr127-ros2 branch March 11, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants