ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2

    Ask your questions right here!
    4
    14
    1247
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ggiacaloneG
      ggiacalone
      last edited by

      Hello,

      I am currently trying (unsuccessfully) to receive ROS2 messages from the mpa-to-ros2 node running on my voxl2 to my laptop.

      When I open up 2 terminals side by side both sshh to the voxl2, I can ros2 run voxl-mpa-to-ros2 voxl-mpa-to-ros2 in one terminal and I can successfully ros2 topic echo /hires_small_color (or other topics) in the other terminal, but if I open up a terminal from my machine not sshh, I cannot ros2 topic echo anything, nor can I ros2 node list and see anything.

      Both devices are running ROS2 Foxy.

      My laptop is Ubuntu 20.04 and the Voxl2 is SDK 1.1.2.

      Both devices (laptop and voxl2) are 192.168.1.x and they CAN ping each other.

      Both devices have the same export ROS_DOMAIN_ID=x in the ~/.bashrc (I am using 21).

      Given all this I am very stumped. Any help would be greatly appreciated as my company purchased this drone with the intention of using it for ROS2 development.

      Thanks in advance,

      Giovanni

      1 Reply Last reply Reply Quote 0
      • ModeratorM
        Moderator ModalAI Team
        last edited by

        Have you looked at ROS 2 network troubleshooting guides? https://docs.ros.org/en/rolling/How-To-Guides/Installation-Troubleshooting.html

        ggiacaloneG 1 Reply Last reply Reply Quote 0
        • ggiacaloneG
          ggiacalone @Moderator
          last edited by ggiacalone

          @Moderator Yes I have!

          ros2 multicast sending and receiving between the devices seems to be working okay.

          I tired getting ros2 run demo_nodes_py talker and listeners to work between the devices but this didn't seem to work either. Oddly enough though, I can see all the nodes from the side of the voxl2 but I can't see the nodes running on the voxl2 from my laptop. They just appear to not exist. But from the voxl side I still cant hear the messages being sent from the talker on my laptop.

          I attached two screenshots, the one with three terminals was taken a few moments before the one with four terminals. Maybe this provides helpful information? The terminal in the top left is the one not ssh into the voxl by the way.

          Screenshot from 2024-03-13 08-54-15.png

          Screenshot from 2024-03-13 08-55-00.png

          ggiacaloneG 1 Reply Last reply Reply Quote 0
          • ggiacaloneG
            ggiacalone @ggiacalone
            last edited by ggiacalone

            @Moderator I also was able to test this on a network from a Wireless Access Point that works for other members of my team using other laptops and robots so I don't believe it's a network configuration issue either...

            ggiacaloneG 1 Reply Last reply Reply Quote 0
            • ggiacaloneG
              ggiacalone @ggiacalone
              last edited by ggiacalone

              @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.

              ggiacaloneG 1 Reply Last reply Reply Quote 0
              • ggiacaloneG
                ggiacalone @ggiacalone
                last edited by

                @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...

                Screenshot from 2024-03-13 11-56-15.png

                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.

                1 Reply Last reply Reply Quote 0
                • Zachary Lowell 0Z
                  Zachary Lowell 0 ModalAI Team
                  last edited by

                  @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.

                  ggiacaloneG 1 Reply Last reply Reply Quote 0
                  • ggiacaloneG
                    ggiacalone @Zachary Lowell 0
                    last edited by ggiacalone

                    @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.

                    ModeratorM 1 Reply Last reply Reply Quote 0
                    • ModeratorM
                      Moderator ModalAI Team @ggiacalone
                      last edited by

                      @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/

                      ggiacaloneG 1 Reply Last reply Reply Quote 0
                      • ggiacaloneG
                        ggiacalone @Moderator
                        last edited by

                        @Moderator

                        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.

                        Screenshot from 2024-03-14 07-51-45.png

                        Step 2, do ros2 topic list on my machine and see nothing.

                        Screenshot from 2024-03-14 07-58-02.png

                        Step 3, confirm that the ros2 topics actually exist on the Voxl2 and that the mpa-to-ros2 node did not fail.

                        Screenshot from 2024-03-14 07-59-01.png

                        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

                        ModeratorM dleeD 2 Replies Last reply Reply Quote 0
                        • ModeratorM
                          Moderator ModalAI Team @ggiacalone
                          last edited by

                          @ggiacalone

                          See this document regarding configuring your environment
                          https://docs.ros.org/en/foxy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html

                          What does

                          echo $ROS_LOCALHOST_ONLY
                          

                          provide?

                          1 Reply Last reply Reply Quote 0
                          • dleeD
                            dlee @ggiacalone
                            last edited by

                            @ggiacalone Did you solve this problem? I have same problem on my drone and laptop.

                            ggiacaloneG 1 Reply Last reply Reply Quote 0
                            • ggiacaloneG
                              ggiacalone @dlee
                              last edited by

                              @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!

                              dleeD 1 Reply Last reply Reply Quote 0
                              • dleeD
                                dlee @ggiacalone
                                last edited by

                                @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.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Powered by NodeBB | Contributors