Trouble with websockets only between roborio and jetson

Hello all,

Our team is having trouble integrating our jetson tx2 WebSocket server with our RoboRio.

Context: We are trying to connect to a ROS bridge server on the jetson and then subscribing to and publishing messages from the RoboRio. We are running the ROS bridge server on port 5800 to conform to the FMS open ports.

Issue: Our RoboRio code rarely receives messages from the jetson, however it ALWAYS sends messages to the jetson. For example, we are sending our odometry data to the jetson from the RoboRio and no matter when we start our RoboRio vs the jetson it will send the odometry messages just fine, but when we try to receive data from the jetson no luck. The jetson will say the RoboRio is connected and even subscribed to the topic we are trying to get data from, but our callback function that takes in the data is not being called at all.

It gets stranger: I have tested our robot code on the wpilib simulator and it is able to reliably connect to and send and receive data from a ROS bridge server across a network just fine 100% of the time. This issue only arises when we are trying to connect between a RoboRio and another device.

What we have tried:

  • Installing an unmanaged switch between the RoboRio and the radio. No dice.
  • Using static IP vs hostname. No difference.
  • Hosting ROS on a laptop instead of jetson and connecting to robot wifi. Same issue. It won’t receive any data.

I am honestly at a loss for what this could be. If someone could offer some advice or look at our code that would be greatly appreciated. Here is a link to the relevant files. We are using ASIO for async networking and then websocketpp library

SOLVED

Just as a follow-up in case anyone else runs into this issue, make sure to set your ROS_IP environment variable on the jetson to your Jetsons IP address. This let’s other devices on the network know which is the Ros master node.

Thank you to @marshall and Kevin Jaget for the advice over email!

More info:
https://answers.ros.org/question/225276/what-the-ros_ip-for/

1 Like

Glad we could help! Good luck this season!

1 Like

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