0
$\begingroup$

Rosanswers logo

Hello,

I'm trying to get the Mbed working with rosserial, on ROS Groovy Ubunbu 12.04 x64. The Mbed node works well on Electric + Ubuntu 10.04 x64. I've installed rosserial using : sudo apt-get install ros-groovy-rosserial So it ought to be a version that works on Groovy.

EDIT : I've just found out that the package ros-groovy-rosserial install an old version of rosserial (0.2.0 instead of 0.3.0), why ? That must explain the issue.

My Mbed client side is based on the one made by Nucho, that works well on ROS Electric : mbed.org/users/nucho/code/rosserial_mbed_lib/

So I've mixed it with the files of the new rosserial_arduino library (located in /opt/ros/groovy/stacks/rosserial/rosserial_arduino/libraries/ros_lib), and using the mbed MODSERIAL library from Andy Kirkham, revision 25:ae0408ebdd68.

My mbed code uses custom messages, that I've rebuild as well, so my mbed program compiles ok. It uses Publishers and Subscribers.

Now on the PC side, when I run the python script, both side are trying to connect, but I've got this error when they try to establish publishers ans subscribers :

rosrun rosserial_python serial_node.py /dev/ttyUSB0
[INFO] [WallTime: 1359047617.162067] ROS Serial Python Node
[INFO] [WallTime: 1359047617.166324] Connected on /dev/ttyUSB0 at 115200 baud
[INFO] [WallTime: 1359047619.272324] Failed Packet Flags 
[ERROR] [WallTime: 1359047619.280724] Failed to parse subscriber. unpack requires a string argument of length 4
[ERROR] [WallTime: 1359047619.285447] Failed to parse subscriber. unpack requires a string argument of length 4
[ERROR] [WallTime: 1359047619.377166] Tried to publish before configured, topic id 125

I think the error occurs on line 219 and 227 of the script SerialClient.py :

m.deserialize(msg)

I think the error might come from the mbed side. Does anyone have an idea on this unpack error, or have seen it on other hardware like the arduino ?

Except the library above I haven't found anything on ROS+Mbed, does anyone use rosserial on the mbed ?

Thanks for your answers. Regards.

EDIT : I've found the solution to this thread :

1 - Don't install rosserial through apt-get, but instead go to your ROS workspace, install mercurial if need :

sudo apt-get install mercurial

2 - Then download the rosserial 0.3.0 package this way in your ROS workspace (replace the middle with the real link, unfortunately I can't post it yet, not enough karma ^^):

hg clone here_type_the_source_link_found_on_rossrerial_wiki rosserial

3 - And build it :

rospack profile
rosmake rosserial

4 - Use Nucho's mbed library as it is (keep the MODSERIAL included). For me everything works as on Electric.


Originally posted by Cyril Jourdan on ROS Answers with karma: 157 on 2013-01-24

Post score: 0


Original comments

Comment by HenryW on 2013-03-31:
Hey I am having the same issue as you had. Trying to install via "hg clone https://github.com/ros-drivers/rosserial.git rosserial" is returning an HTTP 406: Not Acceptable

Not sure why, and googling is not helping

Comment by P.Naughton on 2013-04-11:
you must replace "hg" with "git" to clone a git repository. hg was the command for the old repository location

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

EDIT : I've found the solution to this thread :

1 - Don't install rosserial through apt-get, but instead go to your ROS workspace, install mercurial if need :

sudo apt-get install mercurial 2 - Then download the rosserial 0.3.0 package this way in your ROS workspace (replace the middle with the real link, unfortunately I can't post it yet, not enough karma ^^):

hg clone here_type_the_source_link_found_on_rossrerial_wiki rosserial 3 - And build it :

rospack profile rosmake rosserial 4 - Use Nucho's mbed library as it is (keep the MODSERIAL included). For me everything works as on Electric.


Originally posted by tfoote with karma: 58457 on 2013-11-20

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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