UDPROS communication fails at armhf

asked 2018-05-14 09:50:37 -0600

andrij.cherepaha gravatar image

updated 2018-05-16 03:16:33 -0600

I've tried to pass std_msgs::Int32 using UDPROS transport between 2 nodes at RaspberryPi. First I run it at PC and everything worked as it had been expected. Then I compiled it for RaspberryPI and tried to run both there. It shown next message at Publisher's side:

Error: Received an invalid TCPROS header. Each line must have an equals sign. at line 102 in /tmp/binarydeb/ros-lunar-cpp-common-0.6.9/src/header.cpp

The subscriber:

int main(int argc, char **argv) {
  ros::init(argc, argv, "recv");
  ros::NodeHandle nh;
  ros::Subscriber sub = nh.subscribe(std::string("udp_test"), 1, udpCB, ros::TransportHints().udp());
  ros::spin();
  return 0;
}

The publisher:

  ros::Publisher pub = nh.advertise<std_msgs::Int32>(std::string("udp_test"), 1, false);
  ros::Rate r(1);

  int i = 0;
  std_msgs::Int32 msg;
  while (ros::ok()) {
    msg.data = i;
    pub.publish(msg);
    ++i;
    r.sleep();
  }

Both the publisher and the subscriber don't crash but the callback at subscriber's side isn't invoked. The same message appeared when I tried to run calling unreliable(). On the other hand tcp works well. In order to be sure that it isn't an issue related to crosscompilation I've tried to compile on the board - result was the same. I'm using Ubuntu MATE 16.04 on both raspberry pi and pc. ROS Lunar was installed as described in installation tutorial and has the same version of packages at both machines.

Update: I've tried to run the same code using raspbian os and ros provided from its repository. It works as expected (Kinetic, rosversion 1.12.6)

Anyway it still doesn't work on Ubuntu/Lunar.

edit retag flag offensive close merge delete

Comments

Update: I've tried to run the same code using raspbian os and ros provided from its repository. It works as expected (Kinetic, rosversion 1.12.6)

Can you clarify this sentence a bit? What did you do exactly? And are you now saying that things started working?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-16 03:14:23 -0600 )edit

I'm still unsure as to what you did: could you please make it explicit how you installed ROS (link to tutorials, guides, etc), and what the difference is between the situation where it does work, and where it doesn't.

Please also mention packages that you installed (ie: roscpp version X.Y.Z, etc)

gvdhoorn gravatar image gvdhoorn  ( 2018-05-16 03:34:08 -0600 )edit

The example was not changed. ROS Kinetic was installed from raspbian repository in order to check if the issue can be reproduced in previous versions of ros. Then I ran catkin_make at raspbian and ran nodes. The callback was invoked and no errors happened. It seems that ROSUDP is broken in Lunar.

andrij.cherepaha gravatar image andrij.cherepaha  ( 2018-05-16 03:47:34 -0600 )edit

Forgive my ignorance, but what is the "raspbian repository"? If you're referring to this, then the pkgs that you installed are probably the UpstreamPackages.

How did you install Lunar with that repository?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-16 03:49:02 -0600 )edit

Sorry for mixing everything up. I used Ubuntu/arm to install Lunar (roscpp 1.13.6) as described here http://wiki.ros.org/lunar/Installatio... Here the problem was found. Then I tested the same code with separated installation(Kinetic) using UpstreamPackages coming with raspbian. It worked.

andrij.cherepaha gravatar image andrij.cherepaha  ( 2018-05-16 04:06:56 -0600 )edit

If that is the case then this could be a regression, and should probably be reported over at ros/ros_comm/issues.

Please make your post there as detailed as possible (so include all the info you just now provided in the comments). And provide a way to ..

gvdhoorn gravatar image gvdhoorn  ( 2018-05-16 04:08:43 -0600 )edit

.. reproduce the issue you encounter.

The easier it is to reproduce, the more chance it has to be looked at.

If you do post there, please post a link to your issue here in a comment so we keep things connected.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-16 04:09:10 -0600 )edit
1

The issue was reported as https://github.com/ros/ros_comm/issue...

andrij.cherepaha gravatar image andrij.cherepaha  ( 2018-05-20 14:47:30 -0600 )edit