Ask Your Question
0

rosserial wire

asked 2014-03-25 17:17:52 -0500

Maya gravatar image

updated 2014-03-25 19:25:45 -0500

Hello everyone.

I can't seem to be able to use Wire.h in arduino with the rosserial library. Each time I try, I get this message :

 [WARN] [WallTime: 1395811454.890221] Serial Port read returned short (expected 1 bytes, received 0 instead).
 [WARN] [WallTime: 1395811454.891349] Serial Port read failure: 
 [ERROR] [WallTime: 1395803426.139769] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

I admit, I have both groovy and hydro on my computer but I installed the ros library using rosserial in groovy with grovvy sourced and right now I'm using groovy and not hydro. Here are all the source and command I use on setup :

alias groovy='source /opt/ros/groovy/setup.bash && source /home/ros/catkin_ws/devel/setup.bash && export EDITOR='nano' && export ROS_PACKAGE_PATH=/home/ros/catkin_ws/src:/opt/ros/groovy/share:/opt/ros/groovy/stacks'

Hydro is thus not a factor and if I remove Wire.h from my arduino project the connection is successful and I can publish data.

Any help in order to help sove this problem will be appreciate and rewarded with... heu... love <3. Thanks a lot.

[EDIT for the comments]

@billtecteacher What I mean is, for the error to be appear I have to had #include <Wire.h> at the begin of the code

@balto I rebuild the ros_lib for groovy using

 cd <sketchbook>/libraries
 rm -rf ros_lib
 rosrun rosserial_arduino make_libraries.py .
edit retag flag offensive close merge delete

Comments

what do you mean by adding wire and taking it out. Wondering if it the code associated with wire that is causing the problem and not wire.h?

billtecteacher gravatar imagebilltecteacher ( 2014-03-25 17:27:38 -0500 )edit

Do you rebuild the ros_lib for groovy?

tonybaltovski gravatar imagetonybaltovski ( 2014-03-25 17:42:58 -0500 )edit

I edited the question to answer those questions.

Maya gravatar imageMaya ( 2014-03-25 17:47:38 -0500 )edit

I use the Arduino Wire library with rosserial so I do not believe that is the error. Can you check the code on the Arduino?

tonybaltovski gravatar imagetonybaltovski ( 2014-03-26 05:17:36 -0500 )edit

Well I ran in another problem and I suppressed hydro and reinstall groovy. I'll try reinstall rosserial_arduino and I'll tell if I still have that problem. But the code works fine without #include "Wire.h" and doesn't work with it. And it is the simplest publisher possible. I use nothing else.

Maya gravatar imageMaya ( 2014-03-26 05:51:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-28 00:42:18 -0500

Maya gravatar image

I redid a fresh install of rosserial and used git checkout groovy-devel after the git clone command. I don't exactly know if that's what did the trick but it's working now.

Cheers.

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

1 follower

Stats

Asked: 2014-03-25 17:17:52 -0500

Seen: 952 times

Last updated: Mar 28 '14