Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS Topics not readable outside the machine #134

Closed
vmayoral opened this issue Aug 2, 2013 · 7 comments
Closed

ROS Topics not readable outside the machine #134

vmayoral opened this issue Aug 2, 2013 · 7 comments
Milestone

Comments

@vmayoral
Copy link
Contributor

vmayoral commented Aug 2, 2013

I was making some tests when i noticed that the Topics can't be read outside the machine (i'm currently using the BeagleBone).

Inside of the BeagleBone, having roscore running and a node that is publishing to a topic (e.g. Talker of rospy_tutorials):

  • If i open another terminal inside of the BeagleBone and execute rostopic echo /chatter i get the content being published to the topic.
  • In my Desktop computer, if i configure ROS_MASTER_URI pointing to the BeagleBone and i execute rostopic list:
/chatter
/rosout
/rosout_agg

So the topic seems viewable at least. But if i execute rostopic echo /chatter i get no output.

I beleive this a a serious issue. Could anybody check if this is also happenning in qemu?

@bulwahn
Copy link
Contributor

bulwahn commented Aug 5, 2013

I checked the behavior on qemu and I see the same behavior.

I do not think it is related to cross-compiling some package, but rather to setting up the environment on the host, e.g. maybe we are still missing some environment variables, or some are set wrong.
For example, maybe this is related to setting ROS_MASTER_URI to localhost?

@koenkooi
Copy link
Contributor

koenkooi commented Aug 5, 2013

You can try setting the ROS_MASTER_URI to:

  • 0.0.0.0
  • ::1
  • zeroconf hostname, e.g. beaglebone.local

That should make it listen on the network ports as well.

@vmayoral
Copy link
Contributor Author

vmayoral commented Aug 5, 2013

I tried them all changing localhost but i'm still unable to get what is being published to the topics outside of the BeagleBone.

My default configuration:
For the BeagleBone:

export|grep ROS
export ROS_DISTRO="groovy"
export ROS_ETC_DIR="/usr/etc/ros"
export ROS_MASTER_URI="http://localhost:11311"
export ROS_PACKAGE_PATH="/usr/share:/usr/stacks"

In my desktop machine:

export|grep ROS
declare -x BEAGLEROS="/home/victor/Escritorio/GSOC/setup-scripts/sources/beagle-ros"
declare -x ROS_DISTRO="groovy"
declare -x ROS_ETC_DIR="/opt/ros/groovy/etc/ros"
declare -x ROS_MASTER_URI="http://192.168.1.141:11311"
declare -x ROS_PACKAGE_PATH="/home/victor/catkin_ws/src:/opt/ros/groovy/share:/opt/ros/groovy/stacks"
declare -x ROS_ROOT="/opt/ros/groovy/share/ros"
declare -x ROS_TEST_RESULTS_DIR="/home/victor/catkin_ws/build/test_results"

@vmayoral
Copy link
Contributor Author

vmayoral commented Aug 6, 2013

rostopic hz <rostopic_name> doesn't work either. You can try it out with the chatter example:

rostopic hz /chatter
rostopic hz /chatter
subscribed to [/chatter]


No output. If i do it from the BeagleBone:

rostopic hz /chatter
subscribed to [/chatter]
average rate: 10.057
    min: 0.096s max: 0.100s std dev: 0.00151s window: 9
average rate: 10.028
    min: 0.096s max: 0.100s std dev: 0.00105s window: 19
average rate: 10.015
    min: 0.092s max: 0.108s std dev: 0.00234s window: 29
average rate: 10.014
    min: 0.092s max: 0.108s std dev: 0.00204s window: 39
...

Following @koenkooi suggestion, i replaced localhost in the BeagleBone for 0.0.0.0 using:

declare -x ROS_MASTER_URI="http://0.0.0.0:11311" 

Same results. Topics recognized but not readable.

@vmayoral
Copy link
Contributor Author

vmayoral commented Aug 8, 2013

No progress on my side. I'm using the following variables:

export ROS_WORKSPACE=/usr
export ROS_ROOT=/usr/share/ros
export ROS_MASTER_URI=http://0.0.0.0:11311
export CMAKE_PREFIX_PATH=/usr
export ROS_DISTRO="hydro"
export ROS_PACKAGE_PATH="/home/root/catkin_ws/src:/usr/share"


@bulwahn
Copy link
Contributor

bulwahn commented Aug 8, 2013

I tried it again and I succeeded tweaking my network configuration and environment:

on qemux86-64:
ROS_ROOT=/usr
ROS_MASTER_URI=http://qemux86-64:11311/
CMAKE_PREFIX_PATH=/usr

/etc/hosts:
192.168.7.2 qemux86-64.localdomain qemux86-64

on my other machine:
ROS_MASTER_URI=http://192.168.7.2:11311/

etc/hosts:
192.168.7.2 qemux86-64

I do not know if all the settings are really necessary, but it works for me.

@vmayoral
Copy link
Contributor Author

vmayoral commented Aug 8, 2013

Thanks @bulwahn. Using your setup works for me as well.

In my case it seems that the problem was that in the remote machine. /etc/hosts was not configured.

I thought that was unnecessary because ROS_MASTER_URI already points to the BB but it seem it matters.

@vmayoral vmayoral closed this as completed Aug 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants