Roscore not finding rostopic
I am configuring a whole new setup, with a new Turtleot3, a new computer, and a new wifi network. And I can't get what should simple to work...
On a Mac, Running VMware, with Ubuntu 16.04, and ROS Kinetic installed (correctly, I hope), I have the following confusing behavior. Do you see the problem?
Here are the key environment variables defined in bashrc in the VMWare Linux instance:
export ROS_MASTER_URI=http://129.64.123.200:11311
export ROS_IP=129.64.123.200
In a fresh shell on VMWare:
$ Roscore
... logging to /home/pitosalas/.ros/log/fdf2db06-860d-11e8-b1a7-000c29b28fa8/roslaunch-ubuntu-44713.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://localhost:45411/
ros_comm version 1.12.13
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.13
NODES
auto-starting new master
process[master]: started with pid [44723]
ROS_MASTER_URI=http://localhost:11311/
setting /run_id to fdf2db06-860d-11e8-b1a7-000c29b28fa8
process[rosout-1]: started with pid [44736]
started core service [/rosout]
Note regarding localhost
The report of ROS_MASTER_URI=http://localhost:11311 is what Roscore displays. In both shells we are running on the same .bashrc with export ROS_MASTER_URI=http://129.64.123.200:11311
so I have to assume that Roscore noticing that the master uri env matches localhost, decides to display it as localhost.
Here's the /etc/hosts file which is all defaults as far as I can tell.
127.0.0.1 localhost
127.0.1.1 ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
printenv | grep ros
$ printenv | grep ros
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/pitosalas/catkin_ws/src:/opt/ros/kinetic/share
LD_LIBRARY_PATH=/home/pitosalas/catkin_ws/devel/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu
PATH=/opt/ros/kinetic/bin:/home/pitosalas/bin:/home/pitosalas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PYTHONPATH=/home/pitosalas/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
PKG_CONFIG_PATH=/home/pitosalas/catkin_ws/devel/lib/pkgconfig:/opt/ros/kinetic/lib/pkgconfig:/opt/ros/kinetic/lib/x86_64-linux-gnu/pkgconfig
CMAKE_PREFIX_PATH=/home/pitosalas/catkin_ws/devel:/opt/ros/kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
printenv | grep ROS
$ printenv | grep ROS
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/pitosalas/catkin_ws/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://129.64.123.200:11311
ROS_VERSION=1
ROS_HOSTNAME=localhost
ROSLISP_PACKAGE_DIRECTORIES=/home/pitosalas/catkin_ws/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_IP=129.64.123.200
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
Unable to communicate
Continuing, the same VMWare Linux instance, a different shell:
$ rostopic list
ERROR: Unable to communicate with master!
Can you check your
hosts
file to see what thelocalhost
entry maps to?I've updated the original question with the hosts file.
Can you update your question with the output of
printenv | grep ROS
?Thanks for taking the time to look at this, question is updated.
Np. Can you try it again with
ROS
capitalized?grep
is case sensitive.updated. thanks!
What happens if you manually set
ROS_MASTER_URI
andROS_IP
in each terminal?Weird: I did
On both shells, and then I did
and nothing happened. I tried to ^c and this happened: