Ask Your Question
0

rosserial for Mbed on ROS Groovy - [solved]

asked 2013-01-24 05:44:26 -0500

updated 2014-01-28 17:14:59 -0500

ngrennan gravatar image

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.

edit retag flag offensive close merge delete

Comments

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

HenryW gravatar image HenryW  ( 2013-03-31 18:15:52 -0500 )edit

you must replace "hg" with "git" to clone a git repository. hg was the command for the old repository location

P.Naughton gravatar image P.Naughton  ( 2013-04-11 14:48:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-20 09:59:06 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-01-24 05:44:26 -0500

Seen: 1,225 times

Last updated: Nov 20 '13