ROS2 topic data not visible on remote computer (VOXL2, SDK 1.1)
-
Hey there! I was the author of this post a few weeks back. I failed to read thermal camera data using the voxl-mpa-to-ros node (in ROS1) and @Zachary-Lowell-0 replied with a fix implemented in ROS2. I pulled that fix and installed ROS2 on my VOXL2 Sentinel platform, and I can now read uvc camera data from the /uvc topic without error. Yay!
However, now when I try to echo/subscribe to any voxl-mpa-to-ros topic data on my remote laptop using a shared WiFi connection, the data isn't streaming on my laptop's end. I can both ping my laptop from the VOXL2 and ping the VOXL2 from my laptop, so they definitely see each other. Furthermore, when I do "ros2 node list" on my laptop, I can see the voxl-mpa-to-rose node is running, and doing "ros2 topic info <topic_name>" on my laptop also gives me the correct info for the voxl-node's topics.
To make sure it wasn't some issue with my laptop's network configuration, I set up a basic ROS2 publisher node on a Raspberry Pi and checked that I could receive topic data on my laptop, and this worked seamlessly. So the VOXL2 specifically doesn't seem to properly stream ROS topic data over the network, and I can't figure out why. It's not specific to the voxl-mpa-to-ros node either because I also tried a basic publisher on the VOXL2 and I still can't see the data on my laptop. Is there a ROS2 network setup step I'm missing for the VOXL2? How can I go about identifying what's wrong?
EDIT: I'll also mention the version of ROS2 I am using for every hardware platform mentioned is Foxy
-
Hi @Isaac-Stephan-Remy glad the UVC fix worked for you!
I am a bit confused by what you are asking. Are you ssh'ed into the voxl2 from your computer and then running the mpa-to-ros2 code base? OR are you trying to stream ros2 packets from the voxl2 to your other computer? If its the ladder, what is the method in which you are transmitting the packets over the network? AKA you created this node on the raspberry pi, then you did something else, to send those published packets over the network to your laptop, yes?
If its a simple ssh you are doing and its not streaming while you are sshed into the voxl2, that is most like a setup issue you are seeing. Can you please explain more so what you are trying to do.
Zach
-
FYI, you won't be able to see some of the VOXL2 ROS2 "native" raw topics if the xrce-dds server is active... (voxl-microdds-agent) -- of course, if you don't plan on fiddling with the internal pipeline.
Another interesting thing is that even if you "Stop" voxl-microdds-agent (i.e., systemctl stop voxl-microdds-agent) and try to use a common ROS ID on a "ground station" and VOXL2 to process raw camera and imu topics, the overhead is significant. From my experience, this happens with fast rate and/or large messages. In practicality, you can overcome this using the streamer. Still, if you precisely need "real-time" data in ROS2 format and cannot deploy a docker or another ROS2 node inside the VOXL2, it's easier to set your VOXL2 configuration to a minimal CPU usage and/or throttle down the topic messages. For instance, a simple solution for images is to reduce the resolution.
Finally, the way the mpa-to-ros2 logic works, the topic messages are only published when there's a subscriber (subscriber_count >0),
EDIT: You can change the voxl-microdds-agent source files or carefully open another xrce-dds bridge, so you have one server that communicates with your ground station (or companion computer) and another that communicates with the PX4 inside the VOXL2 -- a bit tricky but possible...
--I hope this helps
ZBFT
-
@Zachary-Lowell-0 Sorry for the late response! Apologies if that was confusing. Yes, the latter: I am trying to stream ros2 packets from the voxl2 to my computer. They are connected to the same WiFi network, and my computer can see the list of mpa-to-ros topics created by the voxl2 when I do "ros2 topic list", but it can't actually echo the data being published. In terms of setup, I was under the impression that with ros2, the two devices (the voxl2 and the computer) just have to be connected to the same network (in this case, WiFi), and then I should be able to stream data without issue.
The raspberry pi was to provide a sanity check. Instead of streaming the voxl2's ros2 data to my computer, I tried doing it with a simple ros2 node on the pi. When using the pi, my computer was able to see the ros2 topic data just fine. The idea there was the same as with the voxl2 + my computer; my computer and the pi were on the same WiFi network but with the pi I could stream ros2 data to my computer without a hitch. So I think something's wrong with how my voxl2 is configured to stream ros2 topic data, but I'm not sure what it is.
-
I need you to still explain how you are sending data from the voxl2 to the parent computer - just because they are on the same wifi network doesn't mean that when you launch the ros2 node on the voxl2, and then run a ros2 topic list on your parent computer it will see those topics. There needs to be somewhere on your rpi or parent computer where you are probing the voxl2's ros2 instance whether you have sockets opened up, etc.
Can you confirm that the voxl2 instance of ros2 is locally publishing - aka adb shell into another terminal instance of the voxl2 while the voxl-mpa-to-ros2 is actively running and try doing a ros2 echo TOPIC to see if it streams just fine locally - if it isnt, then that is your issue right there. Which topics are you actively trying to listen to as well? Do you have all the required services running? AKA voxl-imu-server, voxl-qvio-server, voxl-camera-server, etc.
Can you post a screenshot of
voxl-inspect-services
Zach