Multimaster fkie. Can I see published messages from a topic from another master?
Hello everyone :)
I'm new to ROS and my English isn't very good, so I'm sorry about anything.
Well, I'm using fkie multimaster for an application where I run several roscore. I basically have 2 computers, a desktop computer and a raspberry 3B+, on the same computer network . In each of them I run:
- roscore
- rorun master_discovery_fkie maste_discovery _mcast_group: = 224.0.0.251
- rosrun master_sync_fkie master_sync
In this order. So, in the rasp I do:
- rosrun turtlesim turtlesim_node
A window with a turtle in the middle appears. Next, I make the following command on the desktop computer:
- rostopic list
The result is:
/master_discovery/changes
/master_discovery/linkstats
/rosout
/rosout_agg
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose
So far so good. The problem is when I try to control the turtle's movements on the desktop computer. Using something like:
- rosrun turtlesim turtle_teleop_key
or
- rostopic pub /turtle1/cmd_vel geometry_msgs/Twist -r 1 -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
But if I execute the command on the rasp (where the turtle node was started) it works perfectly. I was wondering if I'm doing something wrong, when trying to control the turtle on the desktop computer or if what I'm trying to do is not supported by fkie. I use melodic, in my desktop computer i have ubuntu 18.04 and my rasp ubuntu mate 18.04.
@Otavio Have you set up properly all needed enviromental variables for multiple machine comunication? You can check the following wiki tutorial and see if that helps. It may happen that both machines are not recognizing each other.
Hello @Weasfas, thanks for the answer. In some of the tests they perform I got to change ROS_MASTER_URI and ROS_IP, putting the IP of the machine.
The link you sent me doesn't seems to use the method I'm using, multimaster fkie.
I believe they are recognizing each other, otherwise the computer would not be able to see a node created in the rasp.
Well, have you tried to made a dummy node to test the communication from one machine to another. Maybe this can help you. For me, it sound like you do not have something properly set up.
It really doesn't seem to have something set up correctly, but I still don't know what it is: / I just find it very strange because at the same time that there seems to be something missing in communication, it also seems to be working. Because I can see the topics created in each other master, if it wasn't working it wouldn't show, right?! Only when sending or viewing a topic by another master that things "bug". In one of the tests I did I also tried these commands from the link you sent.
Mmm, maybe you are right, have you tried to contact the projects mantainer or generate an issue for this problem?
Not yet, I'm in doubt if what I'm trying to do is possible and/or valid. So I asked here first.