Arduino to PC Serial Communication Challenges

GroG's picture

MRL runs on a JVM and can communication to the Arduino micro-controller through a serial port.  MRL controls the Arduino through a serial protocol.  

MRL to Arduino uses a 3 byte command set

msg[0] = METHOD
msg[1] = PARAM1
msg[2] = PARAM2

New Motor GUI

GroG's picture

The Motor service gui is being updated.  It has been designed to support multiple motor controllers. This is nice, since there can be a little complexity in attaching a motor to a motor controller.

For example an Arduino can directly drive a simple 2 bit H-bridge connected to a DC motor.  Or a motor shield can be used, which has its own motor port configuration.  Other shields and bridges might have different configuration.

Lucas Kanade Optical Tracking (OpenCV - LKOpticalTrack Filter)

Lucas and Kanade developed an algorithm which allows tracking of object through a video stream.  The algorithm requires less resources and is usually faster in response than many other forms of tracking.  

Pros :

  • low resource
  • quick response time
  • can track many points at once


Adventures in Xtion

DancesWithRobots's picture

Here's a portion of a screencap I made while trying to sort out some driver/hardware issues.

Basically, it's a matrix of versions of the same software arranged by where they were procured from.  But first, a little explanation might be in order.

MRL PC <-> Rasberry Pi - Streaming Data Now !

GroG's picture

Quiet computer's USB powering the RasPi

Noisy computer's USB powering the RasPi

WooHoo ! - This is a picture of data streaming from an Arduino connected to the Raspberry Pi (running MRL  instance RasPi) connected to my PC (running MRL instance MRL76732)

OpenNI on Linux 32 !

GroG's picture

Finally... Yay !

This morning I finally got this work end to end with a streaming 3D point cloud.  It was slow, but it worked !  The kinect is fast but the display is painfully slow.  If a robot was using the 3D cloud, it wouldn't need a display anyway and there is probably display acceleration software I could be using like JOGL, but its a start !

AutoComplete & Jython script through recording

GroG's picture


Made progress in both these areas (also bug /dev/ttyACM issue with Mega on Linux is fixed)

Autocompletion now returns relevant functions after CTRL+SPACE

MRL on Linux with Arduino Uno or Mega

GroG's picture

MRL currently uses create-labs libraries to interface with serial info - They did a great job of normalizing the Java and doing a full build of 6 types (windows 64/32, Linux 64/32 & Mac 64/32)

Unfortunately the current Jar is filtering out ttyACMx which is the identifier for serial devices for Arduino Uno & Mega..

A easy work-around is to make a symbolic link like this :

ln -s /dev/ttyACM0 /dev/ttyUSB0 

you might need to chown or chmod the new link to give it the appropriate permissions

Joystick / Gamepad GUI interface preview

GroG's picture


The new Joystick service will use JInput & be supported on Windows, Linux & Mac.  It will support Joysticks, Gamepads & Rumblers.  It will have configurable transforms, so you can send the output of an axis directly to an Arduino, Motor shield, or Servo ....

Up to 12 buttons are supported and each button event can be routed to another service...

More to come !


Color Tracking In MRL using OpenCV, Jython, and Arduino Services

michael96_27's picture

Hi guys! :)

I have a project that uses arduino and pan/tilt servos to track a desired color. With the use of a camera and myrobotlab, this project slowly come to life. I and with the help of GroG, are working on it to make it possible. However, it's not yet done and the project is still under progress. Here's some of the highlights of the project. Comments and Suggestions will be greatly appreciated :)

First, you need to download MRL: