Robotics StackExchange | Archived questions

Cannot connect to the ROS master

Hi,

I have ROS running on Jackal UGV. Jackal is connected to the same wifi hotspot as I am with an ip of 10.42.0.10. I can freely ping it or SSH it and get a clear and nice respond.

I have set up .sh file that contains export ROS_MASTER_URI=http://cpr-j100-0093:11311 export ROS_IP=10.42.0.186 <--- jackal master URI and my IP adress on that network.

Here comes the tricky part: When I run rostopic list i only get the /rosout and /rosout_agg. (it is checked that there should be numerous topics available)

Roscore says started roslaunch server http://10.42.0.186:44656/ <--- the port number is different everytime and meanwhile ROSMASTERURI is =http://10.42.0.186:11311/

Can you help me out? Thanks! :)

Asked by weetk on 2017-07-17 07:04:09 UTC

Comments

Do you have a DNS server configured on both your PC and jackal that can resolve cpr-j100-0093 to an IP address? If not, then this could be your problem. Try using IPs only for everything.

Asked by gvdhoorn on 2017-07-17 08:03:45 UTC

I changed the exported ROS_MASTER_URI to the Jackal's IP address. That enabled me to finally see all the topics using rostopic list but now rostopic echo does not give me back anything - seems to be waiting indefinitely.

Asked by weetk on 2017-07-17 08:18:37 UTC

All of this is two-way traffic. Does jackal know how to reach your machine? Have you set ROS_IP on your machine to the IP of the NIC that you are using to communicate with Jackal?

Asked by gvdhoorn on 2017-07-17 08:33:26 UTC

Have you checked this out?

Asked by tonybaltovski on 2017-07-17 21:35:19 UTC

ROS_IP was set, that wasn't the issue. I finally fixed the problem by writing the correct Jackal IP adress and hostname into /etc/hosts file. Now everything seems to be working properly. Thanks everyone involved in the discussion! :))

Asked by weetk on 2017-07-18 09:00:36 UTC

If ROS_IP was set, but you still needed to edit /etc/hosts that means that something wasn't correct (as ROS was still using DNS names).

In any case, please answer your own question by posting an answer and then accepting it.

We don't typically close questions if they are answered.

Asked by gvdhoorn on 2017-07-18 09:04:52 UTC

Answers