rosserial with Teensy 3.1 HelloWorld hangs?

asked 2015-09-23 18:25:20 -0500

bsculley gravatar image

I'm trying to get rosserial ros_lib to work on Teensy 3.1. The HelloWorld example compiles and loads without error, but the Teensy never seems to do anything. I introduced a write to the LED at the top of setup (code below) but the LED never comes on. I'm trying to verify that something is being sent before getting the subscriber working.

Am I missing something? Any ideas how to troubleshoot this?

#include <ros.h>
#include <std_msgs/String.h>

ros::NodeHandle  nh;

std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);

char hello[13] = "hello world!";

void setup()
{
  digitalWrite(LED_BUILTIN,HIGH); // double pulse LED while waiting for I2C requests
  nh.initNode();
  nh.advertise(chatter);
}
edit retag flag offensive close merge delete