ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

OpenCR Board Can't Publish, Can Subscribe (WSL)

asked 2019-05-30 18:53:46 -0500

ros_noob_corgi gravatar image

updated 2019-06-01 00:58:38 -0500

gvdhoorn gravatar image

Hello,

Lately I've been trying to follow the tutorials at the robotis manual to learn about ROS and Turtlebot3. I have a Turtlebot3 Burger.

My setup

  • Using ROS Melodic
  • PC OS: WSL Ubuntu 18.04 Bionic
  • Tb3: Raspberry Pi 3 Ubuntu 18.04 Server Bionic
  • OpenCR 1.0 firmware: v1.2.3
  • ... Let me know to add any other relevant info.

Question

While trying to get SLAM to work, I was experiencing a common issue of no transform from odom to base_footprint. Upon more investigation, I found that I couldn't see any odom data through rostopic echo odom and rostopic hz odom showed that there were never any messages.

However, I know that I can command the turtlebot using keyboard teleop. I just can't receive any messages that are sent "from" the OpenCR board. Why is this?

I have explored the idea of this being a time-sync issue. I have checked to make sure my ROS_MASTER_URI and ROS_HOSTNAME are correct on all machines.

Any help is much appreciated. Thank you.

--EDIT 0: This doesn't seem like a cross-computer issue to me, but rather something with rosserial that is causing topics to not have messages published.--

EDIT 1: actually, it is a cross-machine issue!

EDIT 2: When I use ROS_IP instead of ROS_HOSTNAME and set ROS_MASTER_URI to be http://ip of pc:11311 I don't see any data on the topics from the OpenCR; when I run everything on the RPi, I do see data.

EDIT 3: I am able to publish from RPi to PC and vice versa, but nothing comes from the rosserial_python node.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-05-31 17:24:36 -0500

ros_noob_corgi gravatar image

I have figured out my answer: issues were due to my use of WSL.

edit flag offensive delete link more
0

answered 2019-05-30 22:25:37 -0500

kkrasnosky gravatar image

updated 2019-05-30 22:27:05 -0500

make sure you edit the /etc/hosts file on both machines (or setup DNS on your network) such that each machine can ping the other by hostname.

More details from ROS Network Setup

edit flag offensive delete link more

Comments

1

I've converted this comment into an answer as I believe it is the answer.

@ros_noob_corgi: if you don't have a working DNS for all involved hosts, then try to use IP addresses, and use ROS_IP instead of ROS_HOSTNAME.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-31 01:26:26 -0500 )edit

Hello, I will use ROS_IP instead and see if it fixes my issue. Please see edits :)

ros_noob_corgi gravatar image ros_noob_corgi  ( 2019-05-31 10:53:46 -0500 )edit

Could you describe your network setup a bit better perhaps? How many hosts are involved? How are they connected? How are they communicating? Etc.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-31 12:31:11 -0500 )edit

I have a WiFi router (no WAN though). RPi has static IP; PC has static IP. Only two hosts. They can ping each other. When I run roscore on the Pi, everyone can now see the odom data, but when I was running roscore on my PC, I couldn't see it.

ros_noob_corgi gravatar image ros_noob_corgi  ( 2019-05-31 12:39:17 -0500 )edit
1

Could you please add this to your original question? Also add the values (ie: hostnames and/or IPs) that you've used for ROS_MASTER_URI, ROS_HOSTNAME and ROS_IP.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-31 12:42:53 -0500 )edit

O, wait. I just noticed this:

PC OS: WSL Ubuntu 18.04 Bionic

there is a good chance this is the cause of your problem. WSL is still not quite there yet with everything, especially networking can be finicky.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-31 12:44:02 -0500 )edit

Okay, What about ROS on Windows then? Or should I go with Linux?

ros_noob_corgi gravatar image ros_noob_corgi  ( 2019-05-31 12:51:39 -0500 )edit
1

ROS on Windows is worth a try. It's not going to be as invasive as installing another OS.

Linux (Ubuntu) is definitely going to give you the best user experience (at least with ROS), but may not be necessary.

And I'm not saying that you should install a different OS to solve your problem. Just noticing that you're using WSL, and that it has had problems in the past with this.

If you have an option to use something other than WSL it might help figure out where the problem is.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-31 12:58:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-05-30 18:53:46 -0500

Seen: 458 times

Last updated: Jun 01 '19