Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2
-
@Moderator I was also able to pinpoint the issue to the Voxl2 because I am able to run talker and listener nodes to pass messages between my laptop and a teammate's laptop and I was also able to recreate the same communication issues with his laptop and the Voxl2. I am pretty sure this is a Voxl2 issue and not a ros2 issue. Any help on this would be greatly appreciated.
-
@Moderator I also found this result when running a ros2 wtf. I'm not sure if this is a bad sign but It definitely doesn't look good...
I did the following to install ROS2 Foxy on the Voxl2 according to @Zachary-Lowell-0 's response to another user who was having issues with the foxy install as well.
- sudo apt-get install voxl-ros2-foxy
- sudo apt-get install voxl-mpa-to-ros2
- voxl-configure-mpa-to-ros2
- source /opt/ros/foxy/mpa_to_ros2/install/setup.bash
- export ROS_HOME=/opt/foxy
- ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node
Would love some support on this. Thanks in advance.
-
@ggiacalone You need to blast the ros2 topic through the network - how are you doing this? voxl-mpa-to-ros2 runs internally which is why you can see it on two separate ssh sessions but when you are on a third session and run ros2 topic ofcourse you wont see what the voxl2 is blowing out the system because there is no networking done in voxl-mpa-to-ros2 - by this I mean there is not a node that is connecting to the router and blasting the messages over the dns.
If you wish to be able to view the ros2 topics on your personal computer outside the voxl2 you need to implement a node or some other code that will take the ros topics onboard and blast them to your router to be distributed over your network (which I do not recommend as ros2 is meant for onboard compute) - I would use something like mqtt for this type of architecture. Please let me know if this answers your questions.
-
@Moderator @Zachary-Lowell-0 Thanks for the new info! This totally makes sense. I do wish to still receive the data over ros2 on my laptop. Specifically, I want the time of flight Pointcloud2 messages and the qvio PoseStamped messages for performing mapping with code that will run externally to the Voxl2.
Could you provide a link or some reference to code somewhere that achieves this or something similar? I originally understood that the mpa-to-ros2 node would provide me with ros2 messages over the network. (@Zachary-Lowell-0 said in Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2:
If you wish to be able to view the ros2 topics on your personal computer outside the Voxl2 you need to implement a node or some other code that will take the ros topics onboard and blast them to your router to be distributed over your network)
Also, why would I not be able to at least do ros2 demo_nodes_py talker and listeners between my laptop and the voxl. Shouldn't that at least work? I couldn't even see the talker node running on the Voxl2 from my laptop. This seems concerning to me.
Lastly, Is ROS1 more easily useable compared to ROS2? I need to have certain functionalities working in a short timeframe and I would like to use the option that will realistically work the best.
-
@ggiacalone VOXL 2 is just running Debian linux, there's nothing really special going on that would make it behave any different than other computers
Under ROS 2 is DDS, which is a networking protocol. You mention "ros2 multicast sending and receiving between the devices seems to be working okay." Which two devices? If it's the VOXL 2 and your laptop, it seems that they are communicating over ROS 2 and the network.
The node is publishing topics, what does
ros2 topic list
output?Here's an article that might help: https://roboticsbackend.com/ros2-topic-cmd-line-tool-debug-ros2-topics-from-the-terminal/
-
Yes, multicast works between my laptop and the Voxl2.
However, when I run the mpa-to-ros2 node on the Voxl2, and then I do a ros2 topic list on my laptop there is no sign of the topics or messages being published over the network.
Here is a demo I just ran:
Step 1, Run mpa-to-ros2 on the Voxl2.
Step 2, do ros2 topic list on my machine and see nothing.
Step 3, confirm that the ros2 topics actually exist on the Voxl2 and that the mpa-to-ros2 node did not fail.
I just want access to the topics over ros via my laptop, shouldn't be so complicated. I'm still confused about how ros could be publishing topics and messages, however they are unreachable over the network despite mutlicast working, no firewalls being set up, correct ROS_DOMAIN_IDs set in the bashrc, etc. Could you help clarify on this and provide an example of code that helps to broadcast these topics and messages? @Zachary-Lowell-0
-
See this document regarding configuring your environment
https://docs.ros.org/en/foxy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.htmlWhat does
echo $ROS_LOCALHOST_ONLY
provide?
-
@ggiacalone Did you solve this problem? I have same problem on my drone and laptop.
-
@dlee Not exactly... I ended up switching to ROS1 and everything seems to be working just fine now. I still don't exactly understand why the topics were not being broadcasted over the network. I have been developing with ROS for just a couple years now but this is never something I have ever come across. I'm a little upset there was less help here / support for ROS2 given that the VOXL2 board is advertised as supporting ROS2, but perhaps we're still just missing something? Regardless EOL for ROS1 is still not for quite some time now and I suspect that it will continue to be supported for a while after as well so I don't thing developing in ROS1 is a "bad bet" necessarily. Open to hear thoughts on this from others as well though, I'm always learning and trying to increase my understanding!
-
@ggiacalone I found something. When I start echoing a topic in voxl2, that topic (echoing) shows up on my laptop. I think we need to figure out the ros2 configuration of voxl.