ROSNetworkTablesBridge, a better way to connect WPILib Java and ROS

I’ve created a new way to connect WPILib projects and ROS together. This is in the same vein as a previous post: Rosjava on the roborio

This library is much easier to use in the context FRC and requires fewer dependencies. It also works on the RIO 1 (no more out of memory issues).

This library was tested at Battle Cry 2023. In my tests, I see an average of 0.033…0.062 second round trip delay. This is mostly limited by the roboRIO’s update loop cycle time of 0.02 seconds.

I’ve done my best to document this library as much as possible. Check out the README.md file for details.

As an overview, there are 3 projects:

ROSNetworkTablesBridge is added as a dependency to your Java project (see the README for details).
ros_networktables_bridge_genmsg is for generating Java code for custom messages.
ros_networktables_bridge_host is run on the ROS host and is the other half of the communication protocol.

If there’s interest, I can investigate implementing something like this for WPILib C++ and Python projects.

13 Likes

I’ve heard ROS(robot operating system) is one of the very advanced robot control systems used for pretty professional standard robots. I’m currently internshiping in a robotic lab in a college, and the lab is majoring in building robots for agriculture, like picking apples, tomatoes, etc. All those college students are all masters at ROS, and they have different groups to build full robots from front to back, all using ROS as operating systems. It feels like ROS is pretty important to learn if people wanna major in robotics after highschool

4 Likes

Does this repository also work with ROS 2 as well?

Our team plans to utilize ROS2 this year; wondering which parts of the repo work with ROS2 and which don’t.

Unless you have ROS 1<=>2 bridge running on your system, it will not work with ROS2. If you get ROS2 working with this system let me know! Make a PR if you do.

2 Likes

I’ve updated this library to work with the 2024 version of WPILib. Still ROS 1.
Check the readme for installation instructions.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.