ROS Noetic Master on Ubuntu 20.04 PC cannot be reached by ROS Melodic Node on Ubuntu 18.04 BeagleBone
Using an Ubuntu 18.04 PC with ROS Melodic and a BeagleBone with Ubuntu 18.04 and ROS Melodic everything works fine. I am now testing a Ubuntu 20.04 PC with ROS Melodic. If I run the ROS Master on the BeagleBone (still Ubuntu 18.04 and ROS Melodic) the PC can communicate with the BeagleBone via ROS.
But if the ROS Master is runnung on the PC the BeaglBone ROS Melodic does not find this ROS Master. Ping commands between these two machines work fine and the Variables like ROS_MASTER_URI are correctly set. I have a similar Problem if I run Simulink with the latest ROS Toolbox on my PC.
Is it possible in general, that ROS Noetic can communicate with a ROS Melodic Master but not the other way around? Do I need to have ROS Noetic also on the BeagleBone?
Edit: Thanks for your quick response: On the BeagleBone (BB) I flashed a ready to use image from elinux.org https://elinux.org/Beagleboard:Beagle... On the PC I first installed Ubuntu 20.04 and the ROS Noetic via apt-get.
The PC and BB are connected via USB (virtual IP-connection ethernet over USB). Pings from both sides work fine.
Here detailed informations:
ROS Master (Noetic 1.15.7) on Ubuntu 20.04 PC:
export ROS_MASTER_URI=http://192.168.6.1:11311
export ROS_HOSTNAME=192.168.6.1
Output command "roscore":
... logging to /home/master/.ros/log/4300ceee-aed7-11ea-ba2a-b7f88a7d75c9/roslaunch-ssdtogo-4503.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://192.168.6.1:40083/
ros_comm version 1.15.7
SUMMARY
========
PARAMETERS
* /rosdistro: noetic
* /rosversion: 1.15.7
NODES
auto-starting new master
process[master]: started with pid [4513]
ROS_MASTER_URI=http://192.168.6.1:11311/
setting /run_id to 4300ceee-aed7-11ea-ba2a-b7f88a7d75c9
process[rosout-1]: started with pid [4523]
started core service [/rosout]
ROS Node (Melodic 1.14.3) on Ubuntu 18.04 BeagleBone:
export ROS_MASTER_URI=http://192.168.6.1:11311
export ROS_HOSTNAME=192.168.6.2
Output command "rosrun srp_init gpio_talker.py":
GPIO-Talker starting...
[ERROR] [1592205938.965650]: Unable to immediately register with master node [http://192.168.6.1:11311]: master may not be running yet. Will keep trying.
Source code gpio_talker.py:
#!/usr/bin/env python
#-*- coding: utf-8 -*-
## Simple talker reading P9_11 (GPIO 30) and publishing
## value as UInt8 on topic 'gpio_val'
import rospy
import Adafruit_BBIO.GPIO as GPIO
from std_msgs.msg import UInt8
def talker():
pub = rospy.Publisher('gpio_val', UInt8, queue_size=10)
rospy.init_node('GPIOTalker', anonymous=False)
rate = rospy.Rate(10)
GPIO.setup("P9_11", GPIO.IN)
print('GPIO setup done...')
while not rospy.is_shutdown():
gpio_val = GPIO.input("P9_11") # int value returned
#rospy.loginfo('Talker: GPIO value = ' + str(gpio_val))
pub.publish(gpio_val)
rate.sleep()
if __name__ == '__main__':
try:
print('GPIO-Talker starting...')
talker()
except rospy.ROSInterruptException:
print('ROSInterruptException')
pass
finally:
GPIO.cleanup() # Bewirkt unexport
print('...Pin disabled.')
print('Byebye...')
Built from source? Or do you mean: I'm trying to exchange messages between ROS Noetic on Focal (20.04) with Melodic on Bionic (18.04)?
Please include the values of those variables here, so we can make sure.
As to the rest of your problem description: you'll need to tell us which messages or services aren't working for you. There could well have been changes, but without knowing which messages you're attempting to use, no one can help you.