Andrew Harris just announced support for the Arduino and cmucam3 with ROS packages in his own ajh-ros-pkg repository. The announcement is below.*
Hello, I have released the source code to my ROS packages for
communicating with the Arduino and the cmucam3.
You can get the code from:
There is a subdirectory in there called "arduino" that contains a
sketch.txt file. This is the sketch you must load into the GUI and
upload to the Arduino. Once you do that, you can start the PMAD
rosrun pmad pmad_service.py
Note that you'll have to have a "tty" ROS parameter set up if the USB
does not connect as /dev/ttyUSB0. You might have to set tty to
"/dev/ttyUSB1" for example. Once you set up the service, you can
toggle the digital pins with:
rosservice call pmad_switch_control 4 0
This for example will set digital pin 4 to LOW. Note the status
packet below only returns the state of digital pins 4, ..., 7.
In addition to this, there is a service status that returns the
current A/D outputs on analog pins 0, ..., 3, digital pins 4, ..., 7,
and a count of the number of commands executed.
If you want to get the status to be a "topic", there is an application
rosrun pmad pmad_status_publisher.py
That will publish the status data once per second. The status message
is defined in msg/Status.msg.
BTW pmad stands for power management and distribution, I use solid
state relays on the outputs of the digital pins.
In terms of the
cmucam_png node, it acquires a png file from the
cmucam about once every twenty seconds and publishes it as a
compressed image. To be honest I haven't used it in a while as I've
switched to a firewire USB camera. The image is a PNG file. It takes
~20 seconds per image because they come over a 115,200 bps serial
line. They are 352x287 pixels in size.
Right now for some reason I get compiler errors compiling
so I can't try the
image_view to make sure the image is getting pushed
around. However I have recently tested that I can receive an image
from the cmucam and save it to disk as a png by just adding a couple
lines to save the received png to disk. I am just having trouble
pushing the image around ROS, but it might just be my setup. (It
worked in the past ;) )
For the cmucam application, there is also a binary that must be
downloaded to the camera. The source, etc, for this is in the
directory "png-robin". In order to get this working you should have a
working installation of the cmucam3 development environment, and be
able to compile the examples in the cc3/projects directory. Once you
can do this, and download these examples to the camera, you can make a
new directory in that examples directory called png-robin and copy
the contents of this directory into that one. The makefile will then
work and compile the application. I have also checked in a hex file
that you can use if you don't want to compile the application
yourself. But you'll still have to download the hex file with
Hopefully I have made the packages correctly, but these are the first
ones I've tried to make. If you have any questions on either of these
nodes, of if they don't seem to work, let me know!