Azhar.92
Azhar.92

Reputation: 41

Can see topic in rostopic list but cannot echo

I am working on a tele-operation mode of a mobile robot, from a control station(my laptop).

Both the control station and the mobile robot is using Ubuntu 14.04, ROS Indigo.

The control station and the robot is connected to the same WIFI network and both can ping to each other.

The problem comes when i want to see the LIDAR map/readings on the control station.

When i rostopic list on my control station, i could see the topic. However, when I echo that topic, i didn't receive any message. When i open RViz and add the map , it doesn't show anything(because the message wasn't received in the first place). RViz freezes too when i try to add the map. This does not happens to the other topics. For eg, the topic odom can be echo-ed.

I tried with Ethernet , it works(but it has its own issues ), but i need to be connected through a same WIFI network.

What could be the problem here??

1) Too much data being published?(when i do a rostopic echo in the robot, my screen would be flooded with values)

2) WIFI connection? (i set up a bidirectional networking by exporting ROS_IP and ROS_MASTER_URI, do i have to do anything else?)

3) RViz issues? (it freezes, turns grey when i try )

4) Any other things i am missing out?

and possible solution for this?

Thank you.

Upvotes: 4

Views: 10503

Answers (3)

UserK
UserK

Reputation: 908

Sounds like a hosts definition problem

Pc 1 hostname : name_1 available at 192.168.0.2 Pc 2 hostname : name_2 available at 192.168.0.3

Try setting the /etc/hosts file in both machines adding:

192.168.0.2    name_1
192.168.0.3    name_2

Upvotes: 1

NatiCog
NatiCog

Reputation: 51

Usually, it is a network issue. Where a ros node publishes might not be under the roscore radar.

But incase if you are working on a simulated environment like a gazebo, enabling the simulation by setting the paused=false would fix the issue.

Upvotes: 0

You are doing:

$ rostopic list

and

$ rostopic echo /yourTopic

in the control station, but is the robot publishing the data to that topic? you need to check that. Try printing the msg the Robot is pushing into a Terminal windows and verify your control unit, if sstill not working then you have a network issue

Upvotes: 0

Related Questions