ros_arduino_bridge

103 views
Skip to first unread message

KM6VV

unread,
Feb 20, 2013, 4:53:54 PM2/20/13
to hbrob...@googlegroups.com
Hi Tim, Patrick,

The link for the git package on the ros_arduino_bridge wiki didn't work
(electric), however I did copy and "git" it from my ros_workspace.

I was also able to make it (under turtlebot, diamond? electric??) with
success!

So not sure what I've got yet, and I haven't programmed the Arduino yet.

Just saw the README on the wiki. WOW! Real documentation! This is the
kind of documentation us beginners need for other packages!

I won't ask anything more here until I thoroughly read the 'MD'.

Thanks!

Alan KM6VV


KM6VV

unread,
Feb 21, 2013, 8:53:35 PM2/21/13
to hbrob...@googlegroups.com
Hi,

When I try to "roslaunch ros_arduino_python arduino.launch",
I get "can't find my_arduino_parms.yaml file".

I made a "my_arduino_parms.yaml file", and it is in config directory.

What am I missing?

Thanks!

Alan KM6VV

Patrick Goebel

unread,
Feb 21, 2013, 9:17:41 PM2/21/13
to hbrob...@googlegroups.com
Hi Alan,

The name of the file is my_arduino_params.yaml, not
my_arduino_parms.yaml (you missed the second "a" between the "r" and the
"m" in params.

--patrick

KM6VV

unread,
Feb 21, 2013, 9:59:29 PM2/21/13
to hbrob...@googlegroups.com
Hi Patrick,

I make that mistake all the time! I read and re-read the name many
times. I had even *copied* the file, and renamed it with the my_ on the
front.

I edited the arduino_params.yaml file to correct the name, and then it
found it.

Next problem, I can't find ttyUSB0. I had a camera plugged into USB,
so I've already tried ttyUSB1. Didn't help. I unplugged the camera,
and restarted, no help.

ls /dev/ttyUSB* didn't find anything. Didn't find the camera either
when I plugged it back in.

Ideas?

Thanks!

Alan KM6VV

anfederman@comcast

unread,
Feb 21, 2013, 10:05:30 PM2/21/13
to hbrob...@googlegroups.com
can you do a roscd ros_arduino_python ?

Make sure you have renamed or copied arduino_parms.yaml to
my_arduino_parms.yaml

--------------------------------------------------
From: "KM6VV" <KM...@sbcglobal.net>
Sent: Thursday, February 21, 2013 5:53 PM
To: <hbrob...@googlegroups.com>
Subject: [HBRobotics] ros_arduino_bridge
> --
> You received this message because you are subscribed to the Google Groups
> "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hbrobotics+...@googlegroups.com.
> To post to this group, send email to hbrob...@googlegroups.com.
> Visit this group at http://groups.google.com/group/hbrobotics?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

Patrick Goebel

unread,
Feb 21, 2013, 10:08:56 PM2/21/13
to hbrob...@googlegroups.com
Hi Alan,

If I recall, my Arduino Mega appears as /dev/ttyACM0 under Ubuntu.

--patrick

KM6VV

unread,
Feb 21, 2013, 10:42:09 PM2/21/13
to hbrob...@googlegroups.com
Hi Patrick,

That works! My Arduino comes up as ttyACM0, and the launch reports
connecting to Arduino on port /dev/ttyACM0...
but cannot connect.

And I uniquely see ttyACM0 when and only when the Arduino is plugged in.

ros_arduino _bridge now nicely compiles for the UNO. It too is id as
ttyACM0, but cannot connect...

Alan KM6VV

On 2/21/2013 7:08 PM, Patrick Goebel wrote:
> Hi Alan,
>

Kurt Christofferson

unread,
Feb 21, 2013, 10:01:43 PM2/21/13
to hbrob...@googlegroups.com
/dev/ttyS0


--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsubscribe@googlegroups.com.

Patrick Goebel

unread,
Feb 22, 2013, 9:23:42 AM2/22/13
to hbrob...@googlegroups.com
Hi Alan,

That is odd. Can you please copy and paste the output from your
terminal when it fails to connect? Also, please attach (or copy and
paste) your my_arduino_params.yaml file.

--patrick

anfederman@comcast

unread,
Feb 22, 2013, 11:42:12 AM2/22/13
to hbrob...@googlegroups.com
How are you loading the sketch? I assume you are using the Arduino SDK?
Can you load the ascii table sketch and see the stable return in the serial
monitor?

Might be a USB 2/3 port issue. My Arduino comes up as USB 0/1 but my Neato
board comes up as ACM0 under Ubuntu. I have no idea why.


I am using the 64 bit version of the ADK.
--------------------------------------------------
From: "KM6VV" <KM...@sbcglobal.net>
Sent: Thursday, February 21, 2013 7:42 PM
To: <hbrob...@googlegroups.com>
Subject: Re: [HBRobotics] ros_arduino_bridge
> --
> You received this message because you are subscribed to the Google Groups
> "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hbrobotics+...@googlegroups.com.

KM6VV

unread,
Feb 22, 2013, 11:50:44 AM2/22/13
to hbrob...@googlegroups.com
Well, I see ttyS0-3, but it doesn't work either.
ttyACM0 is seen, and is the response to the Atmel board.

Alan KM6VV

On 2/21/2013 7:01 PM, Kurt Christofferson wrote:
> /dev/ttyS0
>
>

KM6VV

unread,
Feb 22, 2013, 12:31:52 PM2/22/13
to hbrob...@googlegroups.com, Patrick Goebel
Hi Patrick,

Yeah, funny about the IDE. And of course I missed it in your fine document.

I've attached the files and a screen copy.

Thanks for your help!

Alan KM6VV

>I had hoped it was supposed to work that way too but apparently the
>Arduino IDE tries to include MegaEncoderCounter.h anyway (a bug > >
>perhaps in the IDE?) so we have to comment out the MegaEncoderCounter
>line as well.
>
> --patrick

On 2/22/2013 6:23 AM, Patrick Goebel wrote:
> Hi Alan,
>
arduino.launch
bridgeNotes.txt
arduino_params.yaml

KM6VV

unread,
Feb 22, 2013, 1:20:11 PM2/22/13
to hbrob...@googlegroups.com
Hi Alan F,

I'm using a 1.0 Arduino IDE. I was using .22 before, but I'll check the
1.0 as you suggest. I'm on a 32 bit XP Pro system (I need to get IDE up
on Ubuntu 10.4). What's ASCII table?

The Arduino board seems to be identified as ACM0 (checked with 'ls'
command).

I'm trying both of the suggested ports. I can see my ACM0 port appear
when the board is plugged in.

Alan KM6VV

KM6VV

unread,
Feb 22, 2013, 2:37:17 PM2/22/13
to hbrob...@googlegroups.com
I verified the 1.0 IDE and programmed the UNO with some code I had. So
that's OK.

Alan KM6VV

On 2/22/2013 8:42 AM, anfederman@comcast wrote:

Patrick Goebel

unread,
Feb 22, 2013, 4:11:43 PM2/22/13
to hbrob...@googlegroups.com
Hi Alan KM6VV,

The only thing I can think of is that the sketch is not actually running correctly on your Arduino.  With your Arduino connected to your PC and the IDE up and running with the sketch, you should be able to bring up the IDE's Serial Monitor (at 57600 baud) and send the single letter commands directly over the serial link.  For example, type the b command and you should get back the baud rate.  (You can find the other command on the README.md page.)

--patrick

KM6VV

unread,
Feb 22, 2013, 4:22:59 PM2/22/13
to hbrob...@googlegroups.com
Hi Patrick,

I tried that. No response at 57K. Another project programmed and ran
correctly.

Alan KM6VV

On 2/22/2013 1:11 PM, Patrick Goebel wrote:
> Hi Alan KM6VV,
>
> The only thing I can think of is that the sketch is not actually running
> correctly on your Arduino. With your Arduino connected to your PC and
> the IDE up and running with the sketch, you should be able to bring up
> the IDE's Serial Monitor (at 57600 baud) and send the single letter
> commands directly over the serial link. For example, type the b command
> and you should get back the baud rate. (You can find the other command
> on the README.md <https://github.com/hbrobotics/ros_arduino_bridge> page.)
>
> --patrick
>
>
> On 02/22/2013 10:20 AM, KM6VV wrote:
>> Hi Alan F,
>>
>> I'm using a 1.0 Arduino IDE. I was using .22 before, but I'll check
>> the 1.0 as you suggest. I'm on a 32 bit XP Pro system (I need to get
>> IDE up on Ubuntu 10.4). What's ASCII table?
>>
>> The Arduino board seems to be identified as ACM0 (checked with 'ls'
>> command).
>>
>> I'm trying both of the suggested ports. I can see my ACM0 port appear
>> when the board is plugged in.
>>
>> Alan KM6VV
>>
>> On 2/22/2013 8:42 AM, anfederman@comcast wrote:
>>> How are you loading the sketch? I assume you are using the Arduino SDK?
>>> Can you load the ascii table sketch and see the stable return in the
>>> serial monitor?
>>>
>>> Might be a USB 2/3 port issue. My Arduino comes up as USB 0/1 but my
>>> Neato board comes up as ACM0 under Ubuntu. I have no idea why.
>>>
>>>
>>
>

KM6VV

unread,
Feb 22, 2013, 7:05:16 PM2/22/13
to hbrob...@googlegroups.com
Hi Patrick,

Found something funny.

I put in a few println statements:


Serial.println("ROSArduinoBridge 02/22/13");

...

// Read the next character
chr = Serial.read();

Serial.println(chr, DEC);

if(chr == 13)
Serial.println("LF ");

and discovered that the code (at least my compile) can't see the LF!
I see the dec value of the characters I type, but NOT the 13.

I also observed a few hangs when uploading. Which could indicate that
the code didn't load correctly. But I got "done" on the other uploads,
and ran the terminal after that.

Both new ArduinoMega and UNO boards can't see LF.

Made another change:

// Terminate a command with a CR
if (chr == 13 || chr == '/') {

and now the 'b' command works if one types 'b/'

Serial.read is "eating up" the LF for some reason. Maybe a parm to set
in the IDE?

Are you and Alan F. compiling Arduino code under LINUX?

Some read routines strip CR/LF.


Alan




Alex Sy

unread,
Feb 23, 2013, 2:18:01 AM2/23/13
to hbrob...@googlegroups.com
Alan,
In Linux, lines end in LF which is 0x0a (or 10), 0x0d (or 13) is CR which is
usually only found in DOS or Windows machines.
It is somewhat confusing that when you press ENTER on a keyboard, in Linux
it actually sends 0x0a but in Windows it sends 0x0d.
To summarize.
Windows text files have 0x0d and 0x0a which is CR and LF.
Linux text files have ony 0x0A which is LF.
Alex

KM6VV

unread,
Feb 23, 2013, 2:47:24 AM2/23/13
to hbrob...@googlegroups.com
Hi Alex,

I was wondering about that. But Alan f and Patrick have it running. So
unless there is a DOS/LINUX format parameter to set somewhere in the
Arduino IDE...

Funny, I don't get the LF from the Serial.read() either. Maybe I used a
different version of the compiler?

Alan KM6VV

Patrick Goebel

unread,
Feb 23, 2013, 11:12:20 AM2/23/13
to hbrob...@googlegroups.com
Hi Alan KM6VV,

I just tried running compiling and uploading the ROSArduinoBridge sketch
under Windows XP using version 1.03 of the Arduino IDE and it works as
expected. For example, using the Serial Monitor at 57600 baud returns
'57600' when I enter the 'b' command followed by hitting the Enter key.
So the sketch works for me under both Windows XP and Ubuntu 12.04.

--patrick

KM6VV

unread,
Feb 23, 2013, 1:39:43 PM2/23/13
to hbrob...@googlegroups.com, Patrick Goebel, Alan Marconett
Hi Patrick,

I'm using Windows XP and version 1.01 of the Arduino IDE. Also Ubuntu
10.04.

I'm attaching the preferences file for the Arduino IDE, does it match
yours? near the end are two entries for

export.application.platform.linux=true

export.application.platform.windows=true

I suspect some parm controls the LF/CR for read.

I've see the Arduino code return the baud rate, when I patched the code
to take a '/' instead of CR as I think I mentioned.

I will also go to 1.03 for the Arduino IDE.

I suspect this problem might come up again for other users. We need to
determine the parm if that's what it is.

Thanks,

Alan KM6VV
preferences.txt

KM6VV

unread,
Feb 23, 2013, 5:01:11 PM2/23/13
to hbrob...@googlegroups.com
Status:

New Arduino IDE loaded.
ROS Electric on Ubuntu 10.04, Arduino IDE 1.03 on XP Pro.

I can talk to the Arduino with a Docklight terminal but not the Arduino
terminal (doesn't send CR).

Running ros_serial_bridge on ROS and I still get:

Connecting to Arduino on port /dev/ttyACM0 ...
Cannot connect to Arduino!
Make sure you are plugged in and turned on.

ttyACM0 seen with ls /dev/ttyACM0 when Arduino is plugged in w/ USB.

Any ideas?

Thanks,

Alan KM6VV

Patrick Goebel

unread,
Feb 23, 2013, 7:45:42 PM2/23/13
to hbrob...@googlegroups.com
Hi Alan,

Just for grins, can you please try the Arduino IDE on Ubuntu instead of
Windows? On my Ubuntu 12.04 machine, the Linux Arduino 1.03 IDE looks
basically the same as on Windows so it might be worth trying it on the
OS you're gonna use for ROS anyway.

--patrick

KM6VV

unread,
Feb 23, 2013, 8:51:58 PM2/23/13
to hbrob...@googlegroups.com
Hi Patrick,

I intend to put the Arduino IDE on my Ubunto 10.04 as well.

But I WAS able to talk to the Arduino using another terminal program, so
I'm satisfied that it runs.

Tried again to run the Arduino under ROS, but no changes. Had you run
it under Ubuntu 10.04 Diamond or electric?

Alan KM6VV

James Nugen

unread,
Feb 23, 2013, 10:31:01 PM2/23/13
to hbrob...@googlegroups.com
Alan,

It might be a permissions problem with /dev/ttyACM0.  Here is the official Arduino instructions to fix it (first two bullet items):

-James Nugen



--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsubscribe@googlegroups.com.

Patrick Goebel

unread,
Feb 24, 2013, 11:38:50 AM2/24/13
to hbrob...@googlegroups.com
Hi Alan,

Please check out James' answer as this is very likely the culprit (kudos
James!). On Pi Robot, I am running Ubuntu 10.04 + Electric and the
Arduino Mega is /dev/ttyACM0. The permissions look like this:

$ ls -l /dev/ttyACM0

crw-rw---- 1 root dialout 166, 0 2013-02-24 08:31 /dev/ttyACM0

A long time ago, I added my username to the dialout group like this:

$ sudo usermod -a -G dialout patrick

You would of course add your user name. I'm not sure if you'll have to
log out of your Gnome session and log back in for this to take effect.
But once you are properly added to the group, try the command:

$ groups

and you should see a list of groups you belong to including dialout.

BTW, I just noticed that in the Arduino IDE Serial Monitor, I have to
set the line terminator to "Carriage return" or "Both NL and CR" in the
pull down menu beside the baud rate in order to get the single letter
commands to work. Must have done this a long time ago.

--patrick

Alex Sy

unread,
Feb 24, 2013, 1:40:30 PM2/24/13
to hbrob...@googlegroups.com
Hi Alan,
I do not know if your problem is due to permissions, but an easy way to fix
it would be to change the permissions of the device (like /dev/ttyACM0) to
be crw-rw-rw so that any user can communicate with the serial port. The
command would be "sudo chmod 666 /dev/ttyACM0". This changes the last
two -- to rw so that any user can read/write to that device and it would not
matter what login you are using.

The reason I did not think it was a permission issue is that you mentioned
that you were able to talk to it using a temrinal program, I assume you were
running it under the same login as what you used for the ROS. (Unless your
terminal program has a setuid which you can determine by looking at it's
permission flags like sr-xr-xr-x).
Alex

----- Original Message -----
--
You received this message because you are subscribed to the Google Groups
"HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hbrobotics+...@googlegroups.com.

Andre-John mas

unread,
Feb 24, 2013, 2:03:21 PM2/24/13
to hbrob...@googlegroups.com, <hbrobotics@googlegroups.com>
Hi,

I am wondering whether termio settings come into play here?

Andre

Sent from my tablet

KM6VV

unread,
Feb 24, 2013, 4:53:03 PM2/24/13
to hbrob...@googlegroups.com
Hi Patrick, James,


sudo usermod -a -G dialout turtlebot

was not rejected this time.

Got the same this time:

crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACMX

But no error message.

Tried:

$ roslaunch ros_arduino_python arduino.launch

Again, and got the "Cannot connect to Arduino" message.

for the "Groups" command, I only get turtlebot sudo video. No dialout.

I hadn't noticed that the no line was a menu. I looked all over the IDE
for a setup menu. Just what I needed!

What terminal does Ubuntu have? How do I specify a port connection?

thanks!

Alan KM6VV


On 2/24/2013 8:38 AM, Patrick Goebel wrote:
> Hi Alan,
>

e...@okerson.com

unread,
Feb 24, 2013, 5:14:14 PM2/24/13
to hbrob...@googlegroups.com
On Linux systems, group permissions are inherited at login time. If you
add the currently logged in user to a group, you generally have to log out
and log back in to see the changes.

Ed

KM6VV

unread,
Feb 24, 2013, 5:24:50 PM2/24/13
to hbrob...@googlegroups.com
Hi Alex, Patrick,

Must have had something to do with permissions, when I changed to
crw-rw-rw, it connected and then displayed a traceback, with 5 lines of
errors before it shut down...

I talked to the Arduino, but with a terminal program on under XP Pro PC.
How do I use the terminal on Ubuntu to connect to the Arduino?
I'n not Ubuntu savvy.

Thanks!

Alan KM6VV

KM6VV

unread,
Feb 24, 2013, 5:26:49 PM2/24/13
to hbrob...@googlegroups.com
Hi Andre,

Probably! But I haven't figured out how to set them up!

Alan KM6VV

KM6VV

unread,
Feb 24, 2013, 5:37:00 PM2/24/13
to hbrob...@googlegroups.com
Hi Ed,

Logged out/back in, and I now get dialout in the 'groups'.

Back to crw-rw---- 1 again, but same 5 line errors. Still a no-go.

Alan KM6VV

James Nugen

unread,
Feb 24, 2013, 6:13:55 PM2/24/13
to hbrob...@googlegroups.com
On Sun, Feb 24, 2013 at 10:40 AM, Alex Sy <al...@everexcomm.net> wrote:
Hi Alan,
I do not know if your problem is due to permissions, but an easy way to fix
it would be to change the permissions of the device (like /dev/ttyACM0) to
be crw-rw-rw  so that any user can communicate with the serial port.  The
command would be "sudo chmod 666 /dev/ttyACM0".  This changes the last
two -- to rw so that any user can read/write to that device and it would not
matter what login you are using.

Unfortunately, that is only a temporary fix.  The device file is created dynamically when the computer is rebooted or the device is plugged in.
 
The reason I did not think it was a permission issue is that you mentioned
that you were able to talk to it using a temrinal program, I assume you were
running it under the same login as what you used for the ROS.  (Unless your
terminal program has a setuid which you can determine by looking at it's
permission flags like sr-xr-xr-x).

I think he was using a terminal program in Windows XP.

-James Nugen

James Nugen

unread,
Feb 24, 2013, 6:19:55 PM2/24/13
to hbrob...@googlegroups.com
Alan,

You shouldn't need to change the permissions now that your user is in the 'dialout' group.  Can you send the traceback output to us?

-James Nugen



--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsubscribe@googlegroups.com.

KM6VV

unread,
Feb 24, 2013, 6:50:25 PM2/24/13
to hbrob...@googlegroups.com
OOPS!

Thought I posted it.

turtlebot@HexaTraxx:~/ros_workspace/ros_arduino_bridge$ groups
turtlebot sudo video
turtlebot@HexaTraxx:~/ros_workspace/ros_arduino_bridge$ sudo usermod -a
-G dialout turtlebot
turtlebot@HexaTraxx:~/ros_workspace/ros_arduino_bridge$ groups
turtlebot sudo video
turtlebot@HexaTraxx:~/ros_workspace/ros_arduino_bridge$ sudo chmod 666
/dev/ttyACM0
[sudo] password for turtlebot:
turtlebot@HexaTraxx:~/ros_workspace/ros_arduino_bridge$ ls -l /dev/ttyACM*
crw-rw-rw- 1 root dialout 166, 0 2013-02-24 12:29 /dev/ttyACM0
turtlebot@HexaTraxx:~/ros_workspace/ros_arduino_bridge$ roslaunch
ros_arduino_python arduino.launch
... logging to
/home/turtlebot/.ros/log/acf66df8-7ec0-11e2-92f8-0016ea6f4f4c/roslaunch-HexaTraxx-21983.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://172.16.1.34:41676/

SUMMARY
========

PARAMETERS
* /arduino/sensors/arduino_led/type
* /rosdistro
* /arduino/timeout
* /arduino/sensors/arduino_led/rate
* /arduino/baud
* /arduino/sensorstate_rate
* /rosversion
* /arduino/port
* /arduino/base_controller_rate
* /arduino/use_base_controller
* /arduino/sensors/arduino_led/pin
* /arduino/sensors/arduino_led/direction
* /arduino/rate

NODES
/
arduino (ros_arduino_python/arduino_node.py)

ROS_MASTER_URI=http://172.16.1.34:11311

core service [/rosout] found
process[arduino-1]: started with pid [22001]
Connecting to Arduino on port /dev/ttyACM0 ...
Traceback (most recent call last):
File
"/home/turtlebot/ros_workspace/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.py",
line 188, in <module>
myArduino = ArduinoROS()
File
"/home/turtlebot/ros_workspace/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.py",
line 84, in __init__
self.controller.connect()
File
"/home/turtlebot/ros_workspace/ros_arduino_bridge/ros_arduino_python/src/arduino_driver.py",
line 68, in connect
test = self.get_baud()
File
"/home/turtlebot/ros_workspace/ros_arduino_bridge/ros_arduino_python/src/arduino_driver.py",
line 261, in get_baud
return int(self.execute('b'));
File
"/home/turtlebot/ros_workspace/ros_arduino_bridge/ros_arduino_python/src/arduino_driver.py",
line 176, in execute
return int(value)
ValueError: invalid literal for int() with base 10: 'ROSArduinoBridge
02/22/13'
[INFO] [WallTime: 1361743232.333418] Stopping the robot...
[INFO] [WallTime: 1361743232.335613] Shutting down Arduino Node...
[arduino-1] process has died [pid 22001, exit code 1].
log files:
/home/turtlebot/.ros/log/acf66df8-7ec0-11e2-92f8-0016ea6f4f4c/arduino-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
turtlebot@HexaTraxx:~/ros_workspace/ros_arduino_bridge$


Alan KM6VV
> send an email to hbrobotics+unsubscribe@__googlegroups.com
> <mailto:hbrobotics%2Bunsu...@googlegroups.com>.
> To post to this group, send email to hbrob...@googlegroups.com
> <mailto:hbrob...@googlegroups.com>.
> Visit this group at
> http://groups.google.com/__group/hbrobotics?hl=en
> <http://groups.google.com/group/hbrobotics?hl=en>.
> For more options, visit https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com.
bridgeNotes2.txt

Andre-John Mas

unread,
Feb 24, 2013, 7:16:12 PM2/24/13
to hbrob...@googlegroups.com, hbrob...@googlegroups.com
Hi Alan,

I am rusty here, so I will have to look into this deeper.

A few years back I ran into an issue where I wouldn't get input from my serial device unless there was a new line. This was when I was using the Java RxTx project, for serial communication. For this I wrote some 'native' code.  You can look at http://terra-azure.org/?loc=projects/javatermio/index

It's possible this isn't termio related, but given your other avenues haven't solved the issue, it can't hurt to try. 

André-John

Sent from my phone. Envoyé depuis mon téléphone. 

KM6VV

unread,
Feb 24, 2013, 7:36:58 PM2/24/13
to hbrob...@googlegroups.com
Hi Andr�,

Thanks for the link, but I'm not advanced enough to do something with
JavaTermio.

Alan KM6VV

On 2/24/2013 4:16 PM, Andre-John Mas wrote:
> Hi Alan,
>
> I am rusty here, so I will have to look into this deeper.
>
> A few years back I ran into an issue where I wouldn't get input from my
> serial device unless there was a new line. This was when I was using the
> Java RxTx project, for serial communication. For this I wrote some
> 'native' code. You can look at
> http://terra-azure.org/?loc=projects/javatermio/index
>
> It's possible this isn't termio related, but given your other avenues
> haven't solved the issue, it can't hurt to try.
>
> Andr�-John
>
> Sent from my phone. Envoy� depuis mon t�l�phone.
>

James Nugen

unread,
Feb 24, 2013, 7:39:43 PM2/24/13
to hbrob...@googlegroups.com
Alan,

You need to remove the changes you made to the sketch earlier.  You add a "Serial.println("ROSArduinoBridge 02/22/13");" line and made a few other changes.  These changes are causing problems because the python code isn't expecting the additional output.

It might be best to start with a fresh version of the sketch.

-James Nugen







--
You received this message because you are subscribed to the Google
Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send

To post to this group, send email to hbrob...@googlegroups.com.
Visit this group at http://groups.google.com/group/hbrobotics?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsubscribe@googlegroups.com.

Alex Sy

unread,
Feb 24, 2013, 8:39:10 PM2/24/13
to hbrob...@googlegroups.com
Hi Alan,
You can run "minicom", then you have to set the baud rate (use ctl-Z A O
serial port setup) and no hardware flow and no software flow control.
The idea is to make sure that you are getting the right data from the
Arduino.
Then the setting of the chmod 666 is to determine if permissions is an
issue. If it turns out to be the case, then you will need to either make
sure that your group is allowed or to add a script to do the chmod when you
log in.
Then, if it still does not work, you would then play with the termios stuff,
basically Linux fgets waits for the LF (0x0a) to allow a line to be sent to
the application, if the Arduino does not send this, then your app does not
move forward. There are ways to allow Linux to accept without the LF which
is what the termios changes does. Specifically the change is to reset the
ICANON and ECHO bits in the c_lflag then use the getchar calls.
Finally, you would start adding debugging code in the program to find out
where it is hanged or waiting.
Alex

----- Original Message -----
From: "KM6VV" <KM...@sbcglobal.net>
To: <hbrob...@googlegroups.com>
Sent: Sunday, February 24, 2013 2:24 PM
Subject: Re: [HBRobotics] ros_arduino_bridge


e...@okerson.com

unread,
Feb 24, 2013, 7:46:35 PM2/24/13
to hbrob...@googlegroups.com
You can try using minicom to talk to serial ports. If it isn't installed
on your system you can install it with 'sudo apt-get install minicom'.

Once it is installed start it initially with 'minicom -s' to get to the
setup menu. Go down to the 'Serial port setup' menu and change the first
setting to '/dev/ttyACM0', hit escape to drop to the main menu, then go
down to 'Modem and dialing' and erase the first two lines of init strings
so it won't dump them to your Arduino. Hit escape to drop back to the main
menu, then hit escape again to go to the terminal mode. You are now
talking to the serial port.

Ed

KM6VV

unread,
Feb 24, 2013, 8:03:53 PM2/24/13
to hbrob...@googlegroups.com
Yeah!

Thanks James!

It didn't dawn on me that my diagnostic prompt would kill the node.

Alan KM6VV



On 2/24/2013 4:39 PM, James Nugen wrote:
> Alan,
>
> You need to remove the changes you made to the sketch earlier. You add
> a "Serial.println("__ROSArduinoBridge 02/22/13");" line and made a few

KM6VV

unread,
Feb 24, 2013, 8:37:56 PM2/24/13
to hbrob...@googlegroups.com
Hi Alex,

Got it working!

Turned out to be to add the group. It then ran, although the "signon"
message I added to debug the CR/LF problem (not a problem, but my
Arduino terminal on XP OS wasn't set up to see responses.

I removed my message, and it works, doing the flash of pin 13 as directed.

Is minicom part of Ubuntu?

Thanks for all the help guys!

Alan KM6VV

On 2/24/2013 5:39 PM, Alex Sy wrote:
> Hi Alan,

KM6VV

unread,
Feb 24, 2013, 8:50:49 PM2/24/13
to hbrob...@googlegroups.com
Hi Ed,

I loaded minicom, however it complained about not having "permission".
-h gave me some help. Tried minicom ttyACM0, Which is apparently /dev/tty8.

Alan KM6VV

Patrick Goebel

unread,
Feb 24, 2013, 8:54:46 PM2/24/13
to hbrob...@googlegroups.com
Hi Alan,

Fantastic. And thanks to everyone else for help debugging. To avoid
similar pain and suffering by future users, I have updated the
repository as follows:

* the README file now includes a section on adding oneself to the
dialout group

* the README file now also includes instructions for setting the line
terminator in the Arduino IDE Serial Monitor.

* I added a traceback call to the arduino_driver.py file so that failure
to connect to the serial port now displays either a "permission denied"
or a "no such file or directory" error. This would have made it much
easier to debug Alan's issue.

--patrick

KM6VV

unread,
Feb 24, 2013, 9:59:00 PM2/24/13
to hbrob...@googlegroups.com
Hi Patrick,

Got updated, found the git update notes in your book!
Improvements should be helpful for the next users, and the next machine
I install it on!

Thanks again!

Alan KM6VV
Reply all
Reply to author
Forward
0 new messages