Cannot connect to the ROS master

asked 2017-07-17 07:04:09 -0500

weetk gravatar image

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 ROS_MASTER_URI is =http://10.42.0.186:11311/

Can you help me out? Thanks! :)

edit retag flag offensive close merge delete

Comments

1

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-17 08:03:45 -0500 )edit

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.

weetk gravatar image weetk  ( 2017-07-17 08:18:37 -0500 )edit
2

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?

gvdhoorn gravatar image gvdhoorn  ( 2017-07-17 08:33:26 -0500 )edit

Have you checked this out?

tonybaltovski gravatar image tonybaltovski  ( 2017-07-17 21:35:19 -0500 )edit
1

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! :))

weetk gravatar image weetk  ( 2017-07-18 09:00:36 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-18 09:04:52 -0500 )edit