0
$\begingroup$

Rosanswers logo

Hi,I installed rosserial hydro for arduino and ros_lib as written in the wiki. when I try ros hello world example found in ros_lib it compiles and works fine but when i try a ros_lib example with a subscriber, whatever topic name is, i get (from pubsub ros example):

[INFO] [WallTime: 1380287883.995053] ROS Serial Python Node [INFO] [WallTime: 1380287884.001497] Connecting to /dev/ttyACM0 at 57600 baud [INFO] [WallTime: 1380287886.607383] Note: publish buffer size is 512 bytes [INFO] [WallTime: 1380287886.607882] Setup publisher on chatter [std_msgs/String] [ERROR] [WallTime: 1380287886.609524] Creation of subscriber failed: unpack requires a string argument of length 4.

So publisher is created but subscriber fails....! I use hydro on ubuntu 12.04 64bit.Is there a way to solve it?I'm stuck here...!Someone can help me? thank!


Originally posted by GioRos on ROS Answers with karma: 11 on 2013-09-27

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I believe it is temporarily broken, but they are at work on fixing it (see https://github.com/ros-drivers/rosserial/issues/76) -- in the meantime, you could do a git checkout, and roll back to the 0.5.2 tag to get back to the working version until a patch is released. In your catkin workspace you would do:

git clone https://github.com/ros-drivers/rosserial.git
git checkout 0.5.2

Originally posted by fergs with karma: 13902 on 2013-10-01

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by tonybaltovski on 2013-10-02:
When I roll back to 0.5.2, the rosserial_xbee gives me the following error: Tried to publish before configured, topic id 125 but it works fine using rosserial_python fine. I am using the same microcontroller with the same code on it. However, it works on 0.5.1. Should I open an issue on GitHub?

$\endgroup$
0
$\begingroup$

Rosanswers logo

Try recompiling your ros_lib and make sure you source the ROS workspace.

Edit: After updating to the latest rosserial, I have the same problem on a Mega 2560. I recompiled everything and still get [ERROR] [WallTime: 1380645252.267795] Creation of subscriber failed: unpack requires a string argument of length 4


Originally posted by tonybaltovski with karma: 2549 on 2013-10-01

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by GioRos on 2013-10-01:
Arduino Mega 2560 too.Still same problem. I switched to an USB-ISS converter and wrote a node to talk to my sensors by I2C, using write,read unix function. If someone is able to solve it,Please let us know.Thanks.

Comment by tonybaltovski on 2013-10-01:
I tried it on an Uno too, no luck.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.