I changed bashrc file as to make 1 robot as master and another as slave.
#export ROS_MASTER_URI=http://master:11311
#export ROS_IPV6=on
export ROS_MASTER_URI=http://msr-rosbot2:11311
export ROS_IP=msr-rosbot2
When I run roscore on the master I ran into this error
husarion@msr-rosbot2:~$ roscore
… logging to /home/husarion/.ros/log/193c2776-e081-11ea-b022-409f384f007f/roslaunch-msr-rosbot2-5426.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.
RLException: Unable to contact my own server at [http://msr-rosbot2:39947/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot ping itself. Please check
for errors by running:
ping msr-rosbot2
For more tips, please see
http://wiki.ros.org/ROS/NetworkSetup
The traceback for the exception was written to the log file
But when I ping myself it works.
husarion@msr-rosbot2:~$ ping msr-rosbot2
PING msr-rosbot2(master (fc94:f029:6ff5:9675:bcb6:85e8:2fd:dfca)) 56 data bytes
64 bytes from master (fc94:f029:6ff5:9675:bcb6:85e8:2fd:dfca): icmp_seq=1 ttl=64 time=0.182 ms
64 bytes from master (fc94:f029:6ff5:9675:bcb6:85e8:2fd:dfca): icmp_seq=2 ttl=64 time=0.149 ms
64 bytes from master (fc94:f029:6ff5:9675:bcb6:85e8:2fd:dfca): icmp_seq=3 ttl=64 time=0.526 ms
64 bytes from master (fc94:f029:6ff5:9675:bcb6:85e8:2fd:dfca): icmp_seq=4 ttl=64 time=0.507 ms
^C
— msr-rosbot2 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.149/0.341/0.526/0.176 ms
Can you please let me know any change that I need to do?