ROS on Raspberry Pi

1,318 views
Skip to first unread message

David Crawley

unread,
Nov 29, 2012, 3:25:56 AM11/29/12
to hbrob...@googlegroups.com
It was great to meet so many of you tonight who are interested in ROS on raspberry pi. It really is a terrific platform for robotics and at $35 it really can't be beaten. I am looking for the contact details of everyone who is interested in working more on getting ROS working properly on Raspberry Pi.

Please email me and we'll get a SIG going to work on this problem - it will benefit all of us.

David Crawley

blackstag

unread,
Nov 29, 2012, 7:41:38 AM11/29/12
to hbrob...@googlegroups.com
have you seen this post?





David Crawley

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.

Jacek Sawoniewicz

unread,
Nov 29, 2012, 12:55:38 PM11/29/12
to hbrob...@googlegroups.com
Hi David,

I'm very interested in developing with ROS. It's my first contact with this software. I was developing my robotic platforms on QNX and Linux and PIC controllers.
Could you advise me how could I start participation in the ROS project.

I'm also involved in flying robot project and right now I'm looking for platform to conform gyro, accelerometers and mgnetometers, plus some other sensors. Could it be Pi with ROS?


Thank you,
Jacek Sawoniewicz




David Crawley

--

rdo...@bizserve.com

unread,
Nov 29, 2012, 2:40:39 PM11/29/12
to hbrob...@googlegroups.com

It looks like there is already some progress on getting ROS to run on the Raspberry Pi.

 

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=37&t=6552&hilit=ros

 

http://answers.ros.org/question/34501/how-to-setting-up-ros-on-raspberrypi/

 

I imagine with the new 512MB boards that it will be a little easier to run.  This is definitely something I'd like to try and getting running.

 

Robert

David Crawley

unread,
Nov 29, 2012, 2:47:20 PM11/29/12
to hbrob...@googlegroups.com
Great,

Potentially Pi might work for you. The Pi is lightweight, low power and requires only a 5V power source. It has a full set off GPIO headers, plus it runs linux.

I am going to put you on the mailing list. My recommendation is that you buy yourself a raspberry Pi for $35 from Newark http://www.newark.com/jsp/search/productdetail.jsp?SKU=43W5302&CMP=KNC-GPLA.

We will start organizing Pi hacking sessions out of the hacker dojo.

David

David Crawley

unread,
Nov 29, 2012, 2:57:30 PM11/29/12
to hbrob...@googlegroups.com
Yes we already have an installation running on our raspberry Pi. We now need to figure out what we can practically do with it!!

This saturday at 1:30pm at the Hacker Dojo in Mountain View. I will be unveiling a set of  challenges called, The 12 tasks of Hercules. Most of these challenges relate to using ROS with the RPi to do interesting things (e.g. followerbot, SLAM, etc.). If you are interested, come along, we'll be in the electronics lab of Hacker Dojo at      http://goo.gl/maps/qyZ8D. We can use the time to get organised.

David

KM6VV

unread,
Nov 29, 2012, 3:02:13 PM11/29/12
to hbrob...@googlegroups.com
PIE is nice, but how about developing ROS applications for the mini-ITX?
:>)

Alan KM6VV

anfederman@comcast

unread,
Nov 29, 2012, 11:04:07 PM11/29/12
to hbrob...@googlegroups.com
I don't understand - Ubuntu ROS can run natively on a mini-ITX.

--------------------------------------------------
From: "KM6VV" <KM...@sbcglobal.net>
Sent: Thursday, November 29, 2012 12:02 PM
To: <hbrob...@googlegroups.com>
Subject: Re: [HBRobotics] ROS on Raspberry Pi

David Crawley

unread,
Nov 29, 2012, 11:09:24 PM11/29/12
to hbrob...@googlegroups.com
OK,

My view initially was that it was a more expensive machine with similar capabilities, and a smaller user base. 

The fact it can run Ubuntu ROS natively is a powerful argument.

David

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+unsubscribe@googlegroups.com.

KM6VV

unread,
Nov 29, 2012, 11:41:29 PM11/29/12
to hbrob...@googlegroups.com
Yes,

Ubuntu runs on the mini-ITX, and ROS runs under Ubuntu. I've got that.

I want to develop an application, like that which runs Turtlebot or the
Neato XVII. That application will run my "HexaTraxx Moose", a
Robomagellan robot.

I currently have both Turtlebot and Neato code on my ITX, trick is to
pick one of the "programs" (applications?), and modify it to run MY
hardware. I need a few good nodes...

Alan KM6VV

Wayne C. Gramlich

unread,
Nov 29, 2012, 11:50:41 PM11/29/12
to hbrob...@googlegroups.com, Wayne C. Gramlich
On 11/29/2012 08:09 PM, David Crawley wrote:
> OK,
>
> My view initially was that it was a more expensive machine with similar
> capabilities, and a smaller user base.
>
> The fact it can run Ubuntu ROS natively is a powerful argument.

There are issues.

ITX boards come and go. By the time one person figures out all the
issues associated with a particular ITX board, it is out of
production. The RasPi seems likely to avoid this issue.

There are cost and power consuption issues. More power means you
need a bigger battery, which requires a beefier base, etc.

All these issues can be dealt with, but what are the right trade-offs?
Figuring this stuff out is what makes engineering fun!

Regards,

-Wayne

> David
>
> On Thu, Nov 29, 2012 at 8:04 PM, anfederman@comcast
> <anfed...@comcast.net <mailto:anfed...@comcast.net>> wrote:
>
> I don't understand - Ubuntu ROS can run natively on a mini-ITX.
>
> ------------------------------__--------------------
> From: "KM6VV" <KM...@sbcglobal.net <mailto:KM...@sbcglobal.net>>
> Sent: Thursday, November 29, 2012 12:02 PM
>
> To: <hbrob...@googlegroups.com <mailto:hbrob...@googlegroups.com>>
> Subject: Re: [HBRobotics] ROS on Raspberry Pi
>
> PIE is nice, but how about developing ROS applications for the
> mini-ITX? :>)
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To post to this group, send email to hbrob...@googlegroups.com
> <mailto:hbrob...@googlegroups.com>.
> To unsubscribe from this group, send email to
> hbrobotics+unsubscribe@__googlegroups.com
> <mailto:hbrobotics%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/__group/hbrobotics?hl=en
> <http://groups.google.com/group/hbrobotics?hl=en>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To post to this group, send email to hbrob...@googlegroups.com.
> To unsubscribe from this group, send email to
> hbrobotics+...@googlegroups.com.

KM6VV

unread,
Nov 30, 2012, 12:49:25 AM11/30/12
to hbrob...@googlegroups.com
The ITX boards must meet some PC standards. And Ubuntu must know about
the various "glue" chips used for the board and its graphics, sound,
WiFi, LAN, etc. Would the PI be any better?

Current isn't too bad! Maybe 8W for the Mini-ITX? I can work with
that. Don't know about the PI, I'm sure it's even less.

Not sure how one can say that ROS runs "Natively" on the ITX. It's not
an OS, to my knowledge. Does ROS on PI need Linux?

Alan KM6VV

Alex Sy

unread,
Nov 30, 2012, 3:18:04 AM11/30/12
to hbrob...@googlegroups.com, Wayne C. Gramlich
Actually the processor used in the Raspberry Pi was originally designed for
phones and stb, unfortunately, it is somewhat underpowered for that use and
is probably end of lifed. I would not be surprised that it was offered as a
lifetime buy at a very low price to the Raspberry Pi organization.
ITX is just a form factor (like ATX or mini-itx or pico-itx), meant for use
in industrial PCs and there are different chipsets used by the vendors of
these boards, but the one thing in common is that it is basically a X86 PC,
which makes running different O/S possible, drivers are available and all
vendors of wireless lan or other peripheral chipsets etc create drivers for
X86. In some cases, where the chipset vendor wants to keep the driver
closed (ie Windows only), wrappers are available to make them work under
Linux. Arm based boards do not get this kind of support, which is why it is
so hard to get wireless drivers that can act like access points, or get
OpenCV to run with the IPI enhancements (which were created by Intel). The
end result is that doing video processing on Arm based boards will be ultra
slow. One way around this is when some companies provide DSP together in
their chipset, like TI Omap (Beagleboard and Panda Board) but the support is
very variable. Just look at how hard it is to use the DSP inside the
PandaBoard. When they do provide support, it is usually for video playback,
not video encode or image processing that we want for robotics. The
Raspberry Pi does have a video processor, unfortunately, the information is
not publicly available from Broadcom. It is also playback oriented.
Compared to TI processors, the chipset information is not even available
except for some incomplete excerpts.
The real disadvantage of ITX etc is that they are usually physically larger
and consume more current. They also require an additional power supply to
convert 12V to the different voltages (although some vendors have included
it on the motherboard, Intel is one). They also usually have fans.
You can get around the size if you use pico-atx which is about the size of
the Raspberry Pi, but the connectors are harder to work with. You can get
around the power consumption if you are willing to have some microcontroller
do power control of the ITX side.
Just my experience from using them. YMMV. Each robot implementation would
be different based on it's goal making it very hard to have a one size fits
all.

Patrick Goebel

unread,
Nov 30, 2012, 10:48:34 AM11/30/12
to hbrob...@googlegroups.com
Awesome summary Alex! Might be nice to turn your post into a "sticky"
by copying it onto the club wiki.

--patrick

anfederman@comcast

unread,
Nov 30, 2012, 11:40:21 AM11/30/12
to hbrob...@googlegroups.com
I guess there is some confusion when we just use the word 'controller' and
it isn't qualified.

Motor Controllers - usually two types - and I am talking about a separate
piece of hardware. There is a relay type based on H-bridge circuit that
takes a logic signal, and sends either 0, +V or Negative -V and example of
this is the "Spike" controller. The second type is a PWM controller, such
as the Victor or Jaguar. These were originally developed for Radio Control
models, and most take the PWM servo control logic and translate it into -V
0 +V so they control power and hence speed. The genius behind this is if
you can control a servo, you can control a PWM motor controller. Most even
accept RC type cables, though sometimes the gender is wrong. More
sophisticated models allow you to either coast or brake the motor. This
means you can leave the motor inputs open (coast) or closed (brake) so that
the internal impedance of the motor locks it in position - this is pretty
effective with worm gear motors that need to hold a position. The Jaguar or
the Victor 888 each control a single motor.

There are also specific controllers for stepper motors.

(micro)Controller - this is typically an inexpensive intermediate device
like a Basic Stamp or Arduino, that has some limited ability for a self
storing program, and controls a couple of motors and sensors. Over the years
they have become significantly more powerful. We also have competition
controllers like the VexPro which allow both autonomous and tele-operation.
Itis hard to equate a Basic Stamp with a Raspberry Pi. Even is some of
these more sophisticated controllers have built in H-bridge motor control,
but they cannot control the bigger motors of a floorbot. There are also
interface boards that provide sensor and motor control - most use USB, but
some are ethernet or wireless(WiFi, Bluetooth)

Computer - this used to mean a desktop that you ran a program to download
to your controller. Now that it can mean a tablet, phone, or almost
anything, sometimes the computer and controller are merging into a single
device. Since some of these can run fairly complex code it is sometimes
hard to say where the control is being initiated. Since the Raspberry Pi or
Mini-ITX can run Linux, it is 'easy' to port ROS to them. ROS can even be
ported to Android devices(though personally I stay away from this
because of a severe Java allergy)

So how you build your robot and where the 'computers' are is an increasingly
complicated design issue. The club Turtlebot for instance is using an
onboard laptop, built in interface and I-create microcontrollers, and a
separate laptop or mobile device.

Oy Vey!
------------------------------------------------
From: "KM6VV" <KM...@sbcglobal.net>
Sent: Thursday, November 29, 2012 9:49 PM
To: <hbrob...@googlegroups.com>
Subject: Re: [HBRobotics] ROS on Raspberry Pi

William Garrido

unread,
Nov 30, 2012, 11:58:48 AM11/30/12
to hbrob...@googlegroups.com
Btw the GPU on the RPi has been open sourced. I don't think the CPU in the RPi is old I am pretty sure its a newer CPU that isn't available for market consumption. The guys at RPi foundation are broadcom employees and was able to get a NDA to produce the thing but the GPU is open now. The RPi is pretty powerfull especially with Wheezy since it can use hardware acceleration. The Model A went into production so you could use that without Ethernet and use even less power. Model A will run from USB unlike the current Model B.


     Subject: Re: [HBRobotics] ROS on Raspberry Pi

         PIE is nice, but how about developing ROS applications for the
         mini-ITX?  :>)



     --
     You received this message because you are subscribed to the Google
     Groups "HomeBrew Robotics Club" group.
     To post to this group, send email to hbrob...@googlegroups.com
     <mailto:hbrobotics@googlegroups.com>.

     To unsubscribe from this group, send email to
     hbrobotics+unsubscribe@__googlegroups.com
     <mailto:hbrobotics%2Bunsu...@googlegroups.com>.
     For more options, visit this group at
     http://groups.google.com/__group/hbrobotics?hl=en
     <http://groups.google.com/group/hbrobotics?hl=en>.


--
You received this message because you are subscribed to the Google
Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/hbrobotics?hl=en.
--
You received this message because you are subscribed to the Google Groups
"HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/hbrobotics?hl=en.


--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.




--
-William




Dave Hylands

unread,
Nov 30, 2012, 12:31:50 PM11/30/12
to hbrob...@googlegroups.com
Hi William,

On Fri, Nov 30, 2012 at 8:58 AM, William Garrido <blacksp...@gmail.com> wrote:
Btw the GPU on the RPi has been open sourced. I don't think the CPU in the RPi is old I am pretty sure its a newer CPU that isn't available for market consumption. The guys at RPi foundation are broadcom employees and was able to get a NDA to produce the thing but the GPU is open now. The RPi is pretty powerfull especially with Wheezy since it can use hardware acceleration. The Model A went into production so you could use that without Ethernet and use even less power. Model A will run from USB unlike the current Model B.

I think that you'll find that only the ARM side of the GPU source was open sourced. Most of the GPU functionality is actually implemented in the GPU firmware, which to the best of my knowledge was not open sourced.

Patrick Goebel

unread,
Nov 30, 2012, 12:52:23 PM11/30/12
to hbrob...@googlegroups.com
I thought I would use Alan's question below to start a thread on using rosserial.  If you plan to use ROS with an Arduino-based robot, rosserial is probably a good place to start.

I believe that Alan is using an Arduino + RoboClaw.  The RoboClaw is controlled through the Arduino using the supplied library so rosserial will talk to the Arduino and the Arduino will talk to the RoboClaw.  The code we run on the Arduino will publish messages from any sensors we have attached (e.g. IR, sonar) as well as Odometry messages from the encoder data.  Getting the actual data from the sensors requires Ardinuo code that is almost always already available (e.g. NewPing and read_gp2d12_range).  You will also subscribe to the /cmd_vel topic and translate any Twist messages received into RoboClaw commands.

There is quite a bit of work to do and it is best to take it in stages.  If you haven't already done so, start with the rosserial tutorials at:

http://www.ros.org/wiki/rosserial_arduino/Tutorials

If you plan to attach one or more servos to the Arduino, be sure to use the source version of rosserial as Fergs pointed out to me a bug that exists in the Debs for ROS Electric (and probably Fuerte as well?).  To get the source, move into your personal ROS directory ("workspace"), then issue the following command:

$ hg clone https://kforge.ros.org/rosserial/hg rosserial

It turns out there is a bug in the source as well (which I ticketed here).  To fix the bug in your copy of the source, edit the file rosserial/rosserial_arduino/src/ros_lib/ArduinoHardware.h and change the line near the top that reads:

#include <Wprogram.h> // Arduino 0022

to

#include <WProgram.h> // Arduino 0022

(note the change from a lower case "p" to an upper case "P" )

If you run into additional bugs, I would encourage filing a ticket on the rosserial kforge page.

With the source and bug fix in place, move back into your personal ROS directory, then compile the stack using:

$ rosmake rosserial

Note that under Ubuntu 11.10 (Oneric) and ROS Electric, I get the following warning:
WARNING: Rosdep did not detect the following system dependencies as installed: avr-libc, gcc-avr
even though I have avr-libc and gcc-avr installed.  I chose to ignore the warning and things seem to be working.

Finally, start working through the tutorials linked to above.  Using the tutorial code as a starting point, as well as the NewPing and GP2D12 code referred to earlier, I have my Arduino Mega publishing IR and sonar (Ping) messages and it works very nicely.  I will eventually post my code on our club github repository once I have done some more testing.

In the meantime, I know there are others on the list using rosserial.  It would be great to get a summary of your experience, what sensors and motor controllers you are using, and whether or not you have run into any trouble.

--patrick

William Garrido

unread,
Nov 30, 2012, 1:13:01 PM11/30/12
to hbrob...@googlegroups.com
Thanks, I hadn't looked into it that much I guess. I have 2 and 1/2 RPi now. The v2 is pretty nice and would do well in a Robot. I had thought about it except for the current requirement  but now with the Model A it might make since. Currently I had slated the beaglebone but looks the RPi and a mapleleaf or something like that for low level stuff will be  a good setup.

You can read about my 1/2 working RPi here http://www.mobilewill.us/2012/11/raspberry-pi-12-doa.html


--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.

William Garrido

unread,
Nov 30, 2012, 1:16:00 PM11/30/12
to hbrob...@googlegroups.com
Thanks for the rosserial stuff. I hadn't had a chance to play with it but was one of the first things I had looked into when I heard about ROS. From what you can tell do you think it can be adapted to other uC's? Maybe something ARM based. I guess as long as it responds to the messages requests?

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.



--
-William




Alex Sy

unread,
Nov 30, 2012, 3:03:13 PM11/30/12
to hbrob...@googlegroups.com
The GPU code itself is not open sourced nor documented.  What is open sourced is the Arm driver to talk to the firmware that is already in the GPU.  This means that if you want to playback 1080P, you can get that running hardware accelerated, but if you wanted to speedup face recognition, blob tracking, segmentation, SIF etc, then you are out of luck.  Currently, the only Arm I know that has documentation and tools for the DSP is the Omap in the Beagleboard (but not yet on the Pandaboard unless things recently changed, they only do the same as Broadcom).  The RPi is a very nice board (which I am also trying out), but choosing a board really depends on what you want to do on it, and unfortunately the details often get in the way.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.

KM6VV

unread,
Nov 30, 2012, 2:57:34 PM11/30/12
to hbrob...@googlegroups.com
I'm working on it. I get "Name or service not known" when I try to get
rosserial with hg, so I think I need hg first? It's probably in your
book, and I just need to review. I still would like to get a hard copy!

Yes, although I was originally thinking I'd just do serial from the PC
to the RoboClaw, making use of a UNO makes sense. that way, I can read
the six SRF08 sensors, and possibly GP2D12 sensors as well (actually, I
have a little PIC board that already reads six SRF06 rangefinders, and
generates a serial message. Maybe I'll incorporate that). No problems
writing code for these two sensors on a PIC or Arduino in C.

I've also already commanded a 5A RoboClaw from a uP, for that matter.
And I have the Arduino LIB.

Getting Twist messages translated into RoboClaw messages will be one of
the tasks, along with generating Odometry messages, as you've noted.

(ROS 10.04) rosmake rosserial DID run (I think I've loaded rosserial
already). Built 99 packages with 0 failures. Time to try some "Hello
World" messages!

I'm still building Arduino (1.1?) on a Windoz machine. Do I remember
that Arduino can be compiled under Ubuntu?

I'm reading and re-reading the tutorials.

Thanks!
Alan KM6VV

On 11/30/2012 9:52 AM, Patrick Goebel wrote:
> I thought I would use Alan's question below to start a thread on using
> rosserial. If you plan to use ROS with an Arduino-based robot,
> rosserial is probably a good place to start.
>
> I believe that Alan is using an Arduino + RoboClaw. The RoboClaw is
> controlled through the Arduino using the supplied library
> <http://www.pololu.com/file/0J517/roboclaw_arduino.zip> so rosserial
> will talk to the Arduino and the Arduino will talk to the RoboClaw. The
> code we run on the Arduino will publish messages from any sensors we
> have attached (e.g. IR, sonar) as well as Odometry messages from the
> encoder data. Getting the actual data from the sensors requires Ardinuo
> code that is almost always already available (e.g. NewPing
> <http://code.google.com/p/arduino-new-ping/> and read_gp2d12_range
> <http://arduino.cc/playground/Main/ReadGp2d12Range>). You will also
> subscribe to the /cmd_vel topic and translate any Twist messages
> received into RoboClaw commands.
>
> There is quite a bit of work to do and it is best to take it in stages.
> If you haven't already done so, start with the rosserial tutorials at:
>
> http://www.ros.org/wiki/rosserial_arduino/Tutorials
>
> If you plan to attach one or more servos to the Arduino, be sure to use
> the source version of rosserial as Fergs pointed out to me a bug that
> exists in the Debs for ROS Electric (and probably Fuerte as well?). To
> get the source, move into your personal ROS directory ("workspace"),
> then issue the following command:
>
> $ hg clone https://kforge.ros.org/rosserial/hg rosserial
>
> It turns out there is a bug in the source as well (which I ticketed here
> <https://kforge.ros.org/rosserial/trac/ticket/78>). To fix the bug in
> your copy of the source, edit the file
> rosserial/rosserial_arduino/src/ros_lib/ArduinoHardware.h and change the
> line near the top that reads:
>
> #include <Wprogram.h> // Arduino 0022
>
> to
>
> #include <WProgram.h> // Arduino 0022
>
> (note the change from a lower case "p" to an upper case "P" )
>
> If you run into additional bugs, I would encourage filing a ticket
> <https://kforge.ros.org/rosserial/trac/query?component=rosserial&status=assigned&status=new&status=reopened>

blackstag

unread,
Nov 30, 2012, 3:06:59 PM11/30/12
to hbrob...@googlegroups.com
Ros has a group of embedded guys that are producing a Ros bridge for bare metal arms and what not. As for other things like mbed and what not the code is already out there to do the work with rosserial. If it s embedded linux system we also already have incorporated how to make that work with rosserial so you do not have to do the communication work. You still have to write the motor control things and what not to respond to the transcribed messages. I have personally been heavily involved in the embedded Linux portion which works over wifi or serial. If you are looking for  anything in particular let me know if I do not have a direct knowledge I can at least point you to reading material that should help.

William Garrido

unread,
Nov 30, 2012, 7:23:27 PM11/30/12
to hbrob...@googlegroups.com
In my case I do want to be able to do object tracking and room mapping. Have you heard of ROS on the Beaglebone doing things like that? I haven't fully decided on ROS yet but considering it. Not to steal a thread but can ROS do computer vision with a webcam since Kinect is hard to power in a low power environment and trying to stay away from having to have a full computer on a robot. I am going fo low power and long life
--
-William




William Garrido

unread,
Nov 30, 2012, 7:27:15 PM11/30/12
to hbrob...@googlegroups.com
Thanks a bunch. I a considering ROS, so far I am looking at beaglebone for highlevel stuff and mapleleaf or something like it for low level hardware control. I am going for low power and long life. So ROSSerial could take care of the beaglebone to mapleleaf COM's instead of having to write all that. 

Patrick Goebel

unread,
Nov 30, 2012, 7:35:14 PM11/30/12
to hbrob...@googlegroups.com
Hi Alan,

To use the hg command you need the "mercurial" package:

$ sudo apt-get install mercurial

You should be able to install Arduino 0022 using the Ubuntu package
manager. If you want version 1.0.2, you can download a Linux binary or
the source from:

http://arduino.cc/en/Main/Software

I am currently using the binary download.

--patrick

P.S. The book *is* available in print if you were asking. There is both
an Electric and a Fuerte version.

KM6VV

unread,
Nov 30, 2012, 8:43:55 PM11/30/12
to hbrob...@googlegroups.com
Hi Patrick,

Looks like mercurial was already loaded. rosserial apparently built,
although I can't find where!

Still putting my Robomagellan 'bot together. Added an extra spacer on
the springs, and they will now just carry the 'bot. I will order stiffer
springs.

Thanks!

Alan KM6VV

Alex Sy

unread,
Nov 30, 2012, 9:55:39 PM11/30/12
to hbrob...@googlegroups.com
OpenCV which is available with ROS has been ported to Arm and run on Beagleboard, unfortunately, it is significantly slower than on a X86 system since it is CPU intensive.  Room mapping will require the ROS slam package and I do not know how others got as far as getting it working.  Any updates?  As far as I can tell, all the serious work on ROS and OpenCV is done with X86 so if you want the latest, you will have to bite that bullet or write your own.  In a lot of cases, the ROS stuff is running on a PC, outside of the robot, then using networking to communicate with the robot's own controller either by implementing ROS nodes or rosserial.  There is a thread on that in HBRC.

Patrick Goebel

unread,
Dec 1, 2012, 12:44:21 PM12/1/12
to hbrob...@googlegroups.com, james....@gmail.com
So even as I continue to make headway with rosserial, I'm beginning to
have some doubts. This is probably a question for Jim Ronald or Fergs
but perhaps others have thoughts as well.

When I looked around at how others are using ROS with Arduino style
boards, I noticed that some of the bigger projects are not using
rosserial. Instead, the Arduino is programmed to read and write
register values in response to packets sent over the serial link from
the controlling PC. Jim mentioned earlier that he was able to modify
Fergs' ArbotiX code to run on an Arduino Mega 1280 which is an example
of this approach. I'm wondering what the pros and cons are for the two
approaches?

In the meantime, Jim, it would be great to see your modified ArbotiX
code if are willing to share.

Thanks!
patrick

http://www.pirobot.org



KM6VV

unread,
Dec 1, 2012, 1:06:46 PM12/1/12
to hbrob...@googlegroups.com
Seems like it would determine weather one wants to subordinate some of
the tasks to a satellite processor. The serial link could be limiting,
so perhaps higher level data exchanges might be better.

I went through the tutorial, nice! I have a much better understanding
of how to use rosserial now that I've seen the tutorial. SRF08 (single)
has even been added since I downloaded rosserial some time ago. I did
finally find the "stack" on my ROS machine; although it's older then
what I see now.

I have six SRF08 sonar rangefinders, And it's much easier to let an
Arduino Mega handle them, and simply send me scaled ranges, or even a
sector plot.

The Mega can also handle my RoboClaw, and generate Odometry data. I'd
hate to have to run the encoders directly from the ITX.

Yeah, I'd like to see the Fergs' ArbotiX code as well, and/or discuss
his architecture!

You are saying "read and write register values", I suppose one could do
that, just make the uP be a slave I/O. But with a little processing
power, the data can be pre-processed, perhaps even compressed, and the
ITX left to do more higher-level tasks.

But surely in your development of PI you've already resolved those
issues. Tell us about PI's architecture!

Alan KM6VV

Michael Ferguson

unread,
Dec 1, 2012, 3:29:46 PM12/1/12
to hbrob...@googlegroups.com
When I looked around at how others are using ROS with Arduino style boards, I noticed that some of the bigger projects are not using rosserial.  Instead, the Arduino is programmed to read and write register values in response to packets sent over the serial link from the controlling PC.  Jim mentioned earlier that he was able to modify Fergs' ArbotiX code to run on an Arduino Mega 1280 which is an example of this approach.  I'm wondering what the pros and cons are for the two approaches?


Rosserial has a particular set of goals: programming the Arduino should be similar to writing a PC-side node and it should be easy to add new messages. In no way is rosserial really optimized for efficiency or speed, and this is why the ArbotiX driver is quite a bit different. Serializing/Deserializing ROS messages takes a number of cycles. The messages are fairly verbose in their serialized form, taking up more bandwidth than is often really necessary. 

The ArbotiX drivers on the other hand are very optimized for communicating with Dynamixel servos, or anything exposing it's controls in a similar register table (such as the ArbotiX's own PID motor controllers or analog/digital I/O). Of course, adding new features to this driver takes more time/knowledge than ROSserial, and also possibly breaks the wire protocol if you can't make everything look like a Dynamixel packet. With the ArbotiX drivers, the python node that runs on the PC also has a lot more knowledge about the robot, in fact, it has all the specifics on the layout of the robot, where in ROSserial, all specifics are held on the Arduino and the PC really knows nothing about what is out there other than how to send/receive ROS messages. This also means we can do math intensive things on the PC with ArbotiX, but have to do them on the Arduino for the most part in ROSserial (for instance convert dynamixel servo position ticks into floating point radian angles, or even turn the floating point geometry_msgs/Twist velocities into wheel speeds)

In the end, the really big decision is: performance vs. ease of implementation.

Finally, while a number of people have made entire robots based on ROSserial, I have always held that the intended goal was "oh, I have this sensor and I want to plug it into a ROS-based robot, how can I create a driver easily?" and not so much intended for the entire robot controller. While it can be used to control a mobile base, I really think that it becomes problematic when you start talking about arms. The standard ROS message for a mobile base is geometry_msgs/Twist -- which isn't too horrible with 6 float64s. The standard message for controlling an arm these days is a FollowJointTrajectoryAction -- which is going to carry all the names of the joints in an array, plus an array of some number of positions, velocities and efforts for each of those joints -- a message that almost certainly will exceed the memory of the Arduino at some point.

-Fergs

Patrick Goebel

unread,
Dec 1, 2012, 3:55:46 PM12/1/12
to hbrob...@googlegroups.com
Thanks Fergs--sure glad I asked!

Alan, Pi Robot's architecture has been pretty much the same from the beginning: a slave microcontroller that does all the sensor/encoder/motor driver stuff (I've used both the ArbotiX and the Serializer--now called the Element) and either a laptop or mini-ITX.  I wrote the ROS driver for the Serializer/Element, shamelessly emulating Fergs' ArbotiX driver.  You can see the source for all three at:

* arbotix (the gold standard :-))
* element
* serializer


Quoting Fergs:

With the ArbotiX drivers, the python node that runs on the PC also has a lot more knowledge about the robot, in fact, it has all the specifics on the layout of the robot, where in ROSserial, all specifics are held on the Arduino and the PC really knows nothing about what is out there other than how to send/receive ROS messages.

This is actually what prompted my question.  I really prefer to have the robot info on the PC and to be able to use YAML files for configuration, etc.  Although, couldn't one use a bunch of getParam() calls on the Arduino to get the configuration from the PC?

--patrick

http://www.pirobot.org

KM6VV

unread,
Dec 1, 2012, 6:17:53 PM12/1/12
to hbrob...@googlegroups.com
Hi Patrick,

Sorry to bother you again, but although I appear to have successfully
built rosserial on my "workstation" (built from scratch), I am not able
to build rosserial on my "turtlebot clone" machine (ITX with both
turtlebot and neatoxv11 log-ins).

hg clone of rosserial appears to create rosserial under
"home\neatoxv11\alan", but the next step of "rosdep install
rosserial_arduino" fails, "can't identify package. I look under
electric/stacks/ does not get rosserial.

I did copy the ros_lib over from my successful workstation build to my
Windoz Arduino IDE, and was able to build the files under the 0022 IDE.
So that end might work.

Any thoughts?

Thanks!

Alan KM6VV

On 12/1/2012 12:55 PM, Patrick Goebel wrote:
> Thanks Fergs--sure glad I asked!
>
> Alan, Pi Robot's architecture has been pretty much the same from the
> beginning: a slave microcontroller that does all the
> sensor/encoder/motor driver stuff (I've used both the ArbotiX and the
> Serializer--now called the Element) and either a laptop or mini-ITX. I
> wrote the ROS driver for the Serializer
> <http://www.ros.org/wiki/serializer>/Element
> <http://www.ros.org/wiki/element>, shamelessly emulating Fergs' ArbotiX
> <http://www.ros.org/wiki/arbotix> driver. You can see the source for
> all three at:
>
> * arbotix <http://vanadium-ros-pkg.googlecode.com/svn/trunk/arbotix/>
> (the gold standard :-))
> * element <http://pi-robot-ros-pkg.googlecode.com/svn/trunk/element/>
> * serializer <http://pi-robot-ros-pkg.googlecode.com/svn/trunk/serializer/>
>
> Quoting Fergs:
>
>> With the ArbotiX drivers, the python node that runs on the PC also has
>> a lot more knowledge about the robot, in fact, it has all the
>> specifics on the layout of the robot, where in ROSserial, all
>> specifics are held on the Arduino and the PC really knows nothing
>> about what is out there other than how to send/receive ROS messages.
>
> This is actually what prompted my question. I really prefer to have the
> robot info on the PC and to be able to use YAML files for configuration,
> etc. Although, couldn't one use a bunch of getParam() calls on the
> Arduino to get the configuration from the PC?
>
> --patrick
>
> http://www.pirobot.org
>

James Ronald

unread,
Dec 1, 2012, 10:19:55 PM12/1/12
to Patrick Goebel, hbrob...@googlegroups.com
Patrick and all.

It has been since last March since I last played with Fergs Arbotix code. I do still have the my code changes and some notes handy but it was basically a hack/experiment to see if I could get it to work. I was successful in getting it to work and have been keeping it in my back pocket just in case a better solution didn't arrive before I was ready to move forward.  I was hoping that a new ArbotiX product was going to be announced.   

One issue that I did run into is that the standard Arduino Mega does not expose all of the pins. Of interest are PE6 and PE7 which Fregs uses in his ArbotiX 1280 code as external interrupts for the quadrature encoders.  I ended up using PE4 (pin2) and PE5 (pin3) which seem to work fine but will conflict with the Pololu Motor Shield (not an issue with my current motor driver).  My plan before knowing about the Robogaia Mega Quadrature Encoder Counter Shield was to purchase a Seeeduino Mega which brings out all of the pins to headers and revert back to using PE6 and PE7 as external interrupts for the quadrature encoders.

Now that I know about the Robogaia encoder shield It seems that we could relatively easily add support for such to Ferg's ArbotiX code and not have to be concerned with the external interrupts for the quadrature encoders at all.  I was thinking a good name for the build option (Ardiuno Mega, Pololu Motor Shield and Robogaia encoder shield) would be ArbotiX_Mega, if Fergs does not mind.

Anyway, I would be happy to share my changes, after a little clean-up, but they maybe of little use to anyone and cause confusion later down the road.  I'd rather just move forward with a new Arduino Mega 2560 R3 and Robogaia encoder shield and perhaps push the changes to Fergs, if he is interested.      

- Jim

Patrick Goebel

unread,
Dec 2, 2012, 12:16:38 AM12/2/12
to hbrob...@googlegroups.com
Hi Alan,

Please copy-and-paste the exact failure messages you are getting after
running "rosdep install rosserial_arduino".

--patrick

Patrick Goebel

unread,
Dec 2, 2012, 12:24:45 AM12/2/12
to James Ronald, hbrob...@googlegroups.com
Hi Jim,

Thanks for the additional info.  As luck would have it, I just got my Robogaia Mega Encoder Shield in the mail today and I have already verified that it gets the correct counts from my Pololu 131:1 motors.  Over the next few days I will test it with the Arudino Mega + Pololu Motor Shield.  Looks like there are already PID libraries available for the Arduino such as PIDLib.  So first I'll play around with a basic ROSserial approach since it should be fairly easy to set up quickly.  Then we can see how responsive it is on my test robot (a modified Parallax Stingray).  After that, I'd like to return to the idea of an ArbotiX-like approach.  Fergs mentioned that using ROSserial might suffice for base control so it seems worth giving it a try.

--patrick

James Ronald

unread,
Dec 2, 2012, 12:39:55 PM12/2/12
to hbrob...@googlegroups.com
Patrick,

Sounds good and takes some pressure off me.  I think that I'm going to go ahead and order a Robogaia Mega Encoder Shield to play with as well.  I already have an Arduino Mega 1280 and purchased Pololu Motor Shield during the Black Friday deals. I also purchased a Budget Bot Chassis from Trossen which is kind of similar Stingray but the motors come with attached encoders.

- Jim


Patrick Goebel

unread,
Dec 2, 2012, 1:04:20 PM12/2/12
to hbrob...@googlegroups.com
Excellent--and good news on this end.  I just got PID control working on my Stingray using the Arduino+Pololu+Robogaia (APR) setup.  Once I add some comments and do a few more tests, I'll post the code.  Next step is to wrap some ROSserial code around it so it can be controlled with Twist messages...

--patrick

http://www.pirobot.org

Patrick Goebel

unread,
Dec 2, 2012, 10:57:15 PM12/2/12
to hbrob...@googlegroups.com
I'm having trouble publishing Odometry messages from my Arduino ROSserial code.  The code compiles and runs fine on the Arudino Mega.  However, nothing appears on the /odom topic and I occasionally get Lost Sync errors on the rosserial_python terminal.

Fergs, is it possible that an Odometry message consumes more than the 512 byte buffer?  I'm looking at ros.h and I figured I'd try increasing the buffer to, say, 1024 but I'm not sure what number to put in the other two slots in the following line marked by X's:

  typedef NodeHandle_<ArduinoHardware, X, X, 1024, 1024> NodeHandle;

Any number I have tried so far for the X's yields a run time error of:

  Failed Packet Flags

in the rosserial_python window.

--patrick

Michael Ferguson

unread,
Dec 2, 2012, 11:03:15 PM12/2/12
to hbrob...@googlegroups.com
So, the nav_msgs/Odometry has two covariance matrices in it - each is 288 bytes, making the message well over 512. 

The first two numbers to the template are the number of publishers and subscribers -- you probably don't need to change that from the defaults.

-Fergs

Patrick Goebel

unread,
Dec 2, 2012, 11:55:02 PM12/2/12
to hbrob...@googlegroups.com
Thanks Fergs.  So now I am using:

typedef NodeHandle_<ArduinoHardware, 25, 25, 1024, 1024> NodeHandle;

I recompile the Arduino sketch and it runs fine.  I also don't get any errors on the rosserial_python terminal.  The startup messages I see look good:

$ rosrun rosserial_python serial_node.py /dev/ttyACM0
[INFO] [WallTime: 1354509668.858451] ROS Serial Python Node
[INFO] [WallTime: 1354509668.858909] Connected on /dev/ttyACM0 at 57600 baud
[INFO] [WallTime: 1354509671.117213] Note: publish buffer size is 1024 bytes
[INFO] [WallTime: 1354509671.118153] Setup publisher on /odom [nav_msgs/Odometry]
[INFO] [WallTime: 1354509671.124667] Note: subscribe buffer size is 1024 bytes
[INFO] [WallTime: 1354509671.125294] Setup subscriber on /cmd_vel [geometry_msgs/Twist]

However, I'm not getting any data on the /odom topic.  My definitions are as follows:

ODOM_INTERVAL = 1000; // milliseconds
nav_msgs::Odometry odom_msg;
ros::Publisher odomPub("/odom", &odom_msg);

In setup() I run:

  nh.initNode();
  nextOdom = ODOM_INTERVAL;
  nh.advertise(odomPub);

and in loop() I run:

  frameTime = millis();
  if (frameTime > nextOdom) {
    updateOdom();
    nextOdom += ODOM_INTERVAL;
  }
  nh.spinOnce();

My test updateOdom() function looks like this:

void updateOdom() {
  now = nh.now();
 
  geometry_msgs::Quaternion quaternion;
  quaternion.x = 0.0;
  quaternion.y = 0.0;
  quaternion.z = 0.0;
  quaternion.w = 1.0;
 
  odom_msg.header.frame_id = odomFrame;
  odom_msg.child_frame_id = baseFrame;
  odom_msg.header.stamp = now;
 
  odom_msg.pose.pose.position.x = 0;
  odom_msg.pose.pose.position.y = 0;
  odom_msg.pose.pose.position.z = 0;
  odom_msg.pose.pose.orientation = quaternion;
  odom_msg.twist.twist.linear.x = 0;
  odom_msg.twist.twist.linear.y = 0;
  odom_msg.twist.twist.angular.z = 0;

  nh.loginfo("Hello");
  odomPub.publish(&odom_msg);
  nh.loginfo("World");
}

I see the "Hello" and "World" once every second on the terminal but there is no data on the /odom topic.

If I run the exact same procedure but publish a String message instead (like the chatter example), it works fine.

--patrick

Patrick Goebel

unread,
Dec 3, 2012, 12:01:42 AM12/3/12
to hbrob...@googlegroups.com
After a couple of minutes of just letting things run, the rosserial_python/serial_node.py spontaneously combusted with the following output:

Traceback (most recent call last):
  File "/home/patrick/ros_workspace/rosserial/rosserial_python/nodes/serial_node.py", line 81, in <module>
    client.run()
  File "/home/patrick/ros_workspace/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 380, in run
    self.callbacks[topic_id](msg)
  File "/home/patrick/ros_workspace/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 97, in handlePacket
    m.deserialize(data)
  File "/opt/ros/electric/stacks/common_msgs/nav_msgs/src/nav_msgs/msg/_Odometry.py", line 208, in deserialize
    raise roslib.message.DeserializationError(e) #most likely buffer underfill
roslib.message.DeserializationError: unpack requires a string argument of length 288

Austin Hendrix

unread,
Dec 3, 2012, 12:33:23 AM12/3/12
to hbrob...@googlegroups.com
The last time I tried to publish Odometry messages from ROSSerial, I ran into a number of protocol limits. It's been about a year since I tried, so I don't remember all of the specifics. 

A few things I do remember running into: the size of an Odometry message was around 700-800 bytes per message, and with a link speed of 57.6k, you'll spend a significant amount of time just busy-waiting for the arduino serial stack to finish transmitting each message, plus the storage space for each message instance and the processing time it takes to serialize each message. The next step of publishing the requisite tf odometry transforms from the arduino looked similarly grim.

Since I wasn't using all of the positional and velocity terms, large parts of the covariance matrices were also zero, so I created a Lite version of the odometry message and a regular node to republish it as full Odometry message, in addition to publishing the appropriate tf transforms. The node is still in my repository here: https://github.com/trainman419/Senior-Project/tree/master/ros/dagny_odom you can probably re-use it with minimal modifications. If it looks like something that will continue to be useful for future users of rosserial, perhaps we should think about adding it to the rosserial stack or releasing it standalone.

-Austin

Patrick Goebel

unread,
Dec 3, 2012, 12:54:21 AM12/3/12
to hbrob...@googlegroups.com
Thanks Austin,

Yeah, it does look pretty grim.  But I'll take a look at your Lite odometry message over the next couple of days.  At least for now I have the PID and /cmd_vel stuff working nicely on the Arduino.

--patrick

Patrick Goebel

unread,
Dec 3, 2012, 10:25:44 AM12/3/12
to hbrob...@googlegroups.com
Hi Austin,

I gave the OdometryLite message a try and it works brilliantly!  I'm just eyeballing the odometry output right now so I'll have to do more testing but it's looking good.  Many thanks for the tip!


--patrick


On 12/02/2012 09:33 PM, Austin Hendrix wrote:

rdo...@bizserve.com

unread,
Dec 3, 2012, 1:47:10 PM12/3/12
to hbrob...@googlegroups.com

There are also these boards:

 

http://www.hardkernel.com/renewal_2011/main.php

 

So far I am leaning toward the Raspberry Pi since it looks like there will be a lot of support for it and the current 512MB version with mounting holes should work out well in my robot projects.

 

-----Original Message-----
From: "Melvin" <melvin...@googlemail.com>
Sent: Monday, December 3, 2012 11:18am
To: hbrob...@googlegroups.com
Cc: davec...@gmail.com
Subject: [HBRobotics] Re: ROS on Raspberry Pi

Dear all,

I don't know if it is of interest, but have a look at http://cubieboard.org. It's quite similar to the RPi but with better hardware specs. The indigogo campaign is over, so the price is a little higher now, but $49 is still comparable to the RPi if you take the better HW into account..
A drawback is the small community which is a huge advantage for the RPi..

Melvin

On Thursday, November 29, 2012 9:25:56 AM UTC+1, DrDave wrote:

It was great to meet so many of you tonight who are interested in ROS on raspberry pi. It really is a terrific platform for robotics and at $35 it really can't be beaten. I am looking for the contact details of everyone who is interested in working more on getting ROS working properly on Raspberry Pi.
Please email me and we'll get a SIG going to work on this problem - it will benefit all of us.
David Crawley
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To view this discussion on the web visit https://groups.google.com/d/msg/hbrobotics/-/GiscS1lf3BYJ.

blackstag

unread,
Dec 3, 2012, 2:30:56 PM12/3/12
to hbrob...@googlegroups.com
I have the 512MB version here. I also have the 1GB version on order. I am working on ros for it also. Mainly ran into the same things. So i am sure what ever we come up with for Rpi should translate easy enough.  

anfederman@comcast

unread,
Dec 3, 2012, 3:02:00 PM12/3/12
to hbrob...@googlegroups.com
Just saw an add for a VIA embedded (12v) system with all the bells and whistles for 210+ tax and shipping. 

 
 
 
AN older version of the VIA was what they gave away at Robonexus a couple of years ago.

William Garrido

unread,
Dec 4, 2012, 2:54:09 PM12/4/12
to hbrob...@googlegroups.com
What do you mean 1GB on order? There isn't  a 1GB RPi, unless you are referring to the CubieBoard, which has my interest. 

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.



--
-William




blackstag

unread,
Dec 4, 2012, 3:00:23 PM12/4/12
to hbrob...@googlegroups.com
I am referring to the cubie

William Garrido

unread,
Dec 4, 2012, 5:12:24 PM12/4/12
to hbrob...@googlegroups.com
From what I have read and tried you can push the Arduino serial link past 115200. Of course that might not help if the micro can't keep up anyway. In that case you could use a Arduino clone that is faster. 

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.



--
-William




Patrick Goebel

unread,
Dec 4, 2012, 8:40:07 PM12/4/12
to hbrob...@googlegroups.com
Hi William,

Austin's OdometryLite message type is doing the trick even at 57600 baud.  I'm just ironing out one last  bug in my Arduino code but it's looking like it should be possible to use ROSserial to run both PID velocity control and odometry calculations on an Arduino/Pololu/Robogaia setup.

Will post more details and try to address some of the ROSserial issues posted by Alan and Alan in the next few days.

--patrick

KM6VV

unread,
Dec 4, 2012, 10:56:22 PM12/4/12
to hbrob...@googlegroups.com
That would be great!

Alan KM6VV

James Ronald

unread,
Dec 5, 2012, 9:28:14 AM12/5/12
to hbrob...@googlegroups.com
Ditto on the "That would be great!"

My Robogaia should arrive today and I should have time to play with ROS this weekend. In preparation which versions of Ubuntu, ROS and Arduino SDK are you using?  

- Jim

Patrick Goebel

unread,
Dec 5, 2012, 9:18:13 PM12/5/12
to hbrob...@googlegroups.com
Hi Jim,

I'm using ROS Electric (Debian version), Ardinuo 1.02 (Linux 32
binaries) and I alternate between Ubuntu 11.10 and 10.04.

--patrick

James Ronald

unread,
Dec 6, 2012, 7:28:48 PM12/6/12
to hbrob...@googlegroups.com
Hi Patrick,

Thanks for the info.    

My Robogaia arrived today. Now I'm wondering if I should pickup a Arduino Mega 2560 R3.  I'm curious if you noticed whether the Arduino Mega 2560 R3 has the same issue of resetting when the serial port is opened from Linux like the Arduino's that utilize the FTDI chip have.  

- Jim


anfederman@comcast

unread,
Dec 6, 2012, 9:47:26 PM12/6/12
to hbrob...@googlegroups.com
 

Still trying to get rosserial_arduino to work.  The HelloWorld.pde program no longer compiles as supplied from a recent download.  You need to add the "unsigned" qualifier before the char statement.  Otherwise you'll get an error message. This is for IDE 1.0.2 - but I am not sure that 0022 will also show the same error.  Apparently the newer IDE version make changes to string handling.
 
rosrun rosserial also fails to run.  Error message follows:
 

ERROR] [WallTime: 1354846764.670624] Tried to publish before configured, topic id 125

^CTraceback (most recent call last): File "/opt/ros/electric/stacks/rosserial/rosserial_python/nodes/serial_node.py", line 58, in <module> client.run()

File "/opt/ros/electric/stacks/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 260, in run flag[0] = self.port.read(1)

File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 442, in read ready,_,_ = select.select([self.fd],[],[], self._timeout) select.error: (4, 'Interrupted system call')

Is the version of Python an issue?  I was running an older version of Python, but upgraded because I was doing some Django development.

I think this issue is independent of arduino -  I got a similar error on my Turtlebot  running diamondback that started after I upgraded Ubuntu to 11.10  symptoms are that that USB is talking, but not getting anything back.

Man, this is frustrating -   but "Ya gotta suffer if you want to sing the blues."

 

I posted this to ros answers.

 

Pi Robot

unread,
Dec 6, 2012, 10:06:34 PM12/6/12
to hbrob...@googlegroups.com
Hi Jim,

Not sure exactly what you mean.   Can you describe the steps that cause the FTDI Arduino's to reset and how you can tell?  So far the Mega 2560 R3 seems to be very well behaved.  And rosserial has never spontaneously dropped the connection so far when connected over USB.  Last night I even teleoperated the robot for about 10 minutes over Xbee without any trouble.

--patrick

Butokim

unread,
Dec 6, 2012, 10:28:07 PM12/6/12
to hbrob...@googlegroups.com
If you are thinking about a Mega you might want to take a look at the Arduino Due it is a terrific board.
 

James M. Geidl, K6JMG
D.B. Cooper, you have  a message.
 



From: hbrob...@googlegroups.com [mailto:hbrob...@googlegroups.com] On Behalf Of James Ronald
Sent: Thursday, December 06, 2012 4:29 PM
To: hbrob...@googlegroups.com
Subject: Re: [HBRobotics] Getting started with rosserial

Patrick Goebel

unread,
Dec 6, 2012, 10:42:09 PM12/6/12
to hbrob...@googlegroups.com
Hi Alan,

If the HelloWord program you are referring to is the one on this ROS tutorial page, then it compiles fine for me using version 1.02 of the Arduino IDE.  I just copy-and-pasted the code from the Wiki page to an empty window in the Arduino IDE and clicked the check icon.  It also downloads and runs fine on my Arduino Mega 2560 R3.

Regarding the error:

ERROR] [WallTime: 1354846764.670624] Tried to publish before configured, topic id 125

This question has already be asked on answers.ros.org and answered by Fergs:

http://answers.ros.org/question/11953/ros-arduino-hello-world/

You might need to re-copy the ros_lib folder to your sketchbook/libraries folder to make sure it is up-to-date:

$ roscd rosserial_arduino/libraries
$ cp -r ros_lib <sketchbook>/libraries

where <sketchbook> is the path to your Arduino sketchbook folder.

Then make sure you exit the Arduino IDE (if it is open), then fire it up again and re-try the HelloWorld program.

--patrick

James Ronald

unread,
Dec 16, 2012, 12:17:16 PM12/16/12
to Patrick Goebel, hbrob...@googlegroups.com
Hi Patrick,

I changed out my Arduino Mega 1280 clone for a Arduino Mega 2560 and my Robogaia encoder issue now seems to be resolved.

I'm now trying your ros_arduino_bridge code. I still need to tune the PID parameters but so far things look good.  I do have a question regarding using 4x mode on the Robogaia. If your using 4x wouldn't you need to also increase your ticks per revolution by 4x?

- Jim




On Sat, Dec 15, 2012 at 11:24 AM, Patrick Goebel <pat...@pirobot.org> wrote:
Hi Jim,

Sorry to hear about the encoder shield.  You may have already checked this, but on mine I had to reverse the A/B leads on one of the headers.  In other words, the A/B leads coming from the two encoders need to be attached oppositely on the Robogaia: so if one encoder has yellow/white on A/B then the other would have white/yellow on A/B.  (The color of your encoder wires may differ.)

--patrick


On 12/14/2012 09:23 PM, James Ronald wrote:
Hi Patrick,

Your ros_arduino_diff_drive package seems to work great.  However, it seems that the X Axis on my RoboGaia is not working.  Both of my encoders work fine on the Y Axis so it's not the encoders.  I also tested using their demo application and got similar results so it is not your application.  I am using a Arduino Mega 1280 but I don't think that should make a difference. I do suppose that there could also be something wrong with my Arduino Mega 1280.  Perhaps I will run out to Microcenter and pick up a Arduino Mega 2560 Rev 3. tomorrow.  Also, I did leave Robogaia a message via their "contact us" screen.   

- Jim

Patrick Goebel

unread,
Dec 16, 2012, 12:35:47 PM12/16/12
to hbrob...@googlegroups.com, James Ronald
Hi Jim,

I don't even know what the count modes mean--I just chose 4x mode
because I think it was used in the demo script included with the
megaencoder library. However, I *can* say that I seem to be getting the
correct counts per revolution of the wheel using the published value for
the Pololu 131:1 motors (which is what I have on my Stingray). The
specs say 8400 ticks per revolution and that is (roughly) what I get
when I manually turn the wheels and do an XAxisGetCount() or
YAxisGetCount() before and after.

--patrick

On 12/16/2012 09:17 AM, James Ronald wrote:
> Hi Patrick,
>

James Ronald

unread,
Dec 16, 2012, 4:06:11 PM12/16/12
to hbrob...@googlegroups.com, Patrick Goebel
Patrick,

Interesting, I'm using US Digital EP4-100 encoders with 50:1 gear motors (5000CPR) and the multiplier seems to works as expected.  With "MegaEncoderCounter encoders(4)" I get roughly 20,000 and with "MegaEncoderCounter encoders(1)" I get roughly 5000.

- Jim


--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+unsubscribe@googlegroups.com.

Butokim

unread,
Dec 16, 2012, 8:40:33 PM12/16/12
to hbrob...@googlegroups.com
The 4X mode is exactly what it sounds like; it is four times the count sent by the board.  If you are getting 16000 ticks per revolution then you are actually ticking at 4000.  I hope this make some sense.
 

James M. Geidl, K6JMG
D.B. Cooper, you have  a message.
 


From: hbrob...@googlegroups.com [mailto:hbrob...@googlegroups.com] On Behalf Of James Ronald
Sent: Sunday, December 16, 2012 9:17 AM
To: Patrick Goebel; hbrob...@googlegroups.com

Subject: Re: [HBRobotics] Getting started with rosserial

Butokim

unread,
Dec 16, 2012, 8:41:55 PM12/16/12
to hbrob...@googlegroups.com
That is EXACTLY what you should be seeing.
 

James M. Geidl, K6JMG
D.B. Cooper, you have  a message.
 


From: hbrob...@googlegroups.com [mailto:hbrob...@googlegroups.com] On Behalf Of James Ronald
Sent: Sunday, December 16, 2012 1:06 PM
To: hbrob...@googlegroups.com; Patrick Goebel

Subject: Re: [HBRobotics] Getting started with rosserial
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.

James Ronald

unread,
Dec 16, 2012, 9:00:52 PM12/16/12
to hbrob...@googlegroups.com
Jim,

Patrick was saying that he is getting the same number of ticks per revolution for both 4x and 1x modes with the encoders on the motors he is using.  I was saying that the 4x and 1x modes works as they should with the US Digital encoders that I'm using.     

- Jim

Patrick Goebel

unread,
Dec 16, 2012, 9:08:23 PM12/16/12
to hbrob...@googlegroups.com
Hi Jim and Jim,

Sorry Jim R--no I did not to mean to say that I'm getting the *same* ticks per rev in both modes: in fact I get 1/4 the number in 1x mode as I do in 4x mode just like you do.  What I meant to say is that I am getting the *published* value (from Pololu's specs) in the 4x mode.  Also, in looking up the specs of your encoder which I think I found here:

http://www.usdigital.com/products/e4p#description

I wonder what is the true value of "ticks per revolution" in your case: is it the "cycles per revolution" which would be 100 x 50:1 = 5000 or the "pulses per revolution" which would be 400 x 50:1 = 20000?

--patrick
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.

Butokim

unread,
Dec 16, 2012, 9:44:18 PM12/16/12
to hbrob...@googlegroups.com
Jim,
 
Something isn't right with Patrick's stuff.
 

James M. Geidl, K6JMG
D.B. Cooper, you have  a message.
 


From: hbrob...@googlegroups.com [mailto:hbrob...@googlegroups.com] On Behalf Of James Ronald
Sent: Sunday, December 16, 2012 6:01 PM
To: hbrob...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages