Ask Your Question

how to run rosserial on maple? [closed]

asked 2012-10-19 02:38:55 -0500

bobliao gravatar image

updated 2012-10-19 17:50:06 -0500

I intend to set up the rosserial on maple ide,and i also reference to the previous question here : talk about my steps:

1.use the rosserial_client,and plus the msgs ,as std_msgs,sensor_msgs and so on.

2.create a new MapleHardware.h for the maple ide ,as following:


#include <maple.h>
#include <WProgram.h>
#include <HardwareSerial.h>

class MapleHardware {
    MapleHardware(HardwareSerial* io , long baud= 57600){
      iostream = io;
      baud_ = baud;
      iostream = &Serial1;
      baud_ = 57600;
    MapleHardware(MapleHardware& h){
      this->iostream = iostream;
      this->baud_ = h.baud_;

    void setBaud(long baud){
      this->baud_= baud;

    int getBaud(){return baud_;}

    void init(){

    int read(){return iostream->read();};
    void write(uint8_t* data, int length){
      for(int i=0; i<length; i++)

    unsigned long time(){return millis();}

    HardwareSerial* iostream;
    long baud_;


3 I create the required ros.h,as following:

#ifndef _ROS_H_
#define _ROS_H_

#include "ros/node_handle.h"
#include "MapleHardware.h"

namespace ros
  /* downsize our buffers */
  typedef NodeHandle_<MapleHardware, 6, 6, 150, 150> NodeHandle;

  //typedef NodeHandle_<MapleHardware> NodeHandle;


4. Then I copy the helloworld.pde from the rosserial_arduino example. However ,it doesn't work...

[INFO] [WallTime: 1350648220.197274] ROS Serial Python Node
[INFO] [WallTime: 1350648220.197554] Connected on /dev/ttyACM0 at 57600 baud
[ERROR] [WallTime: 1350648235.197972] Lost sync with device, restarting...
[ERROR] [WallTime: 1350648250.201682] Lost sync with device, restarting...
[ERROR] [WallTime: 1350648265.205663] Lost sync with device, restarting...

I suspect that the " typedef NodeHandle_<MapleHardware, 6, 6, 150, 150> NodeHandle;" may be wrong,or somewhere else. many many thanks for any tips or comments .

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-09-28 01:13:08.356085

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-03 09:22:37 -0500

kobaan gravatar image


edit flag offensive delete link more

Question Tools


Asked: 2012-10-19 02:38:55 -0500

Seen: 204 times

Last updated: Jan 03 '13

Related questions