Multiple machines, only some topics work

I am attempting to set up the connection from my laptop to the master on my rover.
I have set my ROS_IP and ROS_MASTER_URI following the tutorial but have some issues.

my computer is running noetic on ubuntu 20.04.2

good:

    • on my computer, i can do and see all the topics.
    • i can for example do <rostopic echo /battery> on my laptop terminal and see the correct output
    • i can echo /tf and /wheel_odom, and visualize everything in rviz on my laptop

bad:

    • i can NOT publish into /cmd_vel from my laptop and make the rover move.
    • if i echo /cmd_vel from my laptop, and publish from the raspberry pi through ssh, i dont see the message on my laptop

I thought i had figured out the network since i can see the topics on both machines, but the communication isnt working properly.

on computer:
ROS_MASTER_URI=http://master.localnet:1131
ROS_IP-10.211.55.4 (maybe this is wrong?)

running on my compjuter gives the following output:

parallels@ubuntu-linux-20-04-desktop:~/ros_ws/src$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1c:42:78:0e:7e brd ff:ff:ff:ff:ff:ff
    inet 10.211.55.4/24 brd 10.211.55.255 scope global dynamic eth0
       valid_lft 1794sec preferred_lft 1794sec
    inet6 fdb2:2c26:f4e4:0:21c:42ff:fe78:e7e/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 2591629sec preferred_lft 604429sec
    inet6 fe80::21c:42ff:fe78:e7e/64 scope link 
       valid_lft forever preferred_lft forever

I assume, if you perform the same but locally in the Rover, it works, right?

Yeah, everything works on the rover

Ok, so it’s typically an issue within ROS network itself. @Blazej_Sowa

What programming language are you using?

I’m using python. asdfg

Had you had any similar communication issues before? Such as Bluetooth or WiFI

I think i figured out a solution. I was running ubuntu on parallells(virtual machine software) which gave me issues with the ROS_IP configuration.
I switched to running a ubuntu 18.04 terminal in windows instead.
Now i can publish to topics from my desktop and the robot will actually receive the message.
Now i have a different issue with rviz not receiving any messages though, but this is a separate issue i supppose.

Ah, it’s Christmas already, so you’d need to wait further for the guys to respond :stuck_out_tongue:
But I can tell you that running ROS on Windows (any way) may bring some issues that occur in the most surprising way. I mean, you’d spend a lot of time debugging when actually it’s an OS related issue.

You can use this image to burn bootable Ubuntu to your pendrive and actually run full Ubuntu with ROS as if you ran a virtual machine. Works both on PC/laptop and Mac.

Keep in mind the image is quite old, so it can take some time to run update and upgrade there. As well, you can see no Wifi drivers there, so you need to download them manually if you have a newer device.

The easiest way is to connect your phone with tethered hotspot and download the drivers then. Otherwise you’d get the standard philosophical dillema - how to download the Internet drivers with no Internet :smiley:

Think i finally worked something out.
I am now running ros noetic on windows natively.
I can see my robot and use moveit to move the arm. Everything seems to be working well.

The only issue so far with native windows ros is that the pincher_arm package doesn’t seem to compile 100% correctly, and i also can’t install it with chocolatey like i should(it says it can’t find the package). Though I understand this is an expected thing with running ros on windows.

Anyway, with ros on windows natively everything works “pretty” well. There does seem to he something funky with doing moveit stuff (no interactive marker but can move arm to predetermined positions) but i expect this has to do with the pincher_arm package not installing seamlessly.

Anyway, for now i think my issue is mostly resolved ^^.

Summary:

  • Ubuntu on Mac Parallells caused issues with networking(possibly just my fault, multiple layers of networks)

  • Ubuntu terminal in Windows PC caused issues with visualization and some communication stuff (but could publish to the rover)

  • ros on windows natively WORKS, can visualize and communicate everything. Minor issue with one package but everything seems to work quite well

Takeaway: invest the time and money for a clean Linux desktop setup with ros next time. Makes everything a lot more straight-forward I’m sure.

Happy holidays!!