chipKIT® Development Platform

Inspired by Arduino™

I need help writing hardware class for max32 rosserial.

Created Mon, 25 Mar 2013 23:02:25 +0000 by alphamike


alphamike

Mon, 25 Mar 2013 23:02:25 +0000

I am trying to use rosserial (from willow garage) with a max32 that I have. If I use the rosserial_arduino, It never connects due to rosserial is made for 8 bit devices. I am trying to make myself a new hardware class by following [url]http://ros.org/wiki/rosserial_client/Tutorials/Adding%20Support%20for%20New%20Hardware[/url] I looked through it, but I'm not sure what I am doing. I had asked the ROS community here[url]http://answers.ros.org/question/58388/how-to-write-new-hardware-class-for-rosserial/[/url] but no help yet. Has anyone used rosserial with a chipkit? This is the last part of my robot that I am totally stuck on. I am trying to use this to relay wheel encoder information to ROS. I am using mpide 0023. Any help would be awesome.


Jacob Christ

Tue, 26 Mar 2013 21:28:05 +0000

What do you mean by it never connects?

The example page looks like its using generic types (architecturally independent uint8_t). The 8-bit Arduino stuff I've ported to chipKIT the biggest hangups were types and SPI communications (Ardunio code that talked directly to the Atmel chips).

Jacob


alphamike

Wed, 27 Mar 2013 00:36:05 +0000

I can upload the example code"hello world" tutorial from[url]http://www.ros.org/wiki/rosserial_arduino/Tutorials/Hello%20World[/url] It compiles and runs, when I launch the ros side with this command

rosrun rosserial_python serial_node.py /dev/ttyUSB0

to talk to the max32, all I get is > rosrun rosserial_python serial_node.py /dev/ttyUSB0 [INFO] [WallTime: 1364337022.272446] ROS Serial Python Node [INFO] [WallTime: 1364337022.272779] Connecting to /dev/ttyUSB0 at 57600 baud [ERROR] [WallTime: 1364337024.378596] Lost sync with device, restarting... [ERROR] [WallTime: 1364337039.388014] Lost sync with device, restarting...

every time the ros node says restarting, the tx(ld2?) and rx(ld1?) blink just for a moment. I am fairly new at all this and not too sure of what to do. any help would be appreciated. I am running ros groovy, Ubuntu 12.04 LTS and mpide 23.