ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

rosserial_arduino is NOT a full-featured ROS installation, so there are many features that don't work for the Arduino, and many things that are different.

In general, tutorials that describe standard ROS features do not apply to the Arduino.

In particular, array messages are raw C arrays; not vectors. Have a look at the rosserial Messages description, which shows how to properly initialize a JointState message on the arduino.

I don't see it in the documentation, but I believe that in order to get tf::createQuaternionFromYaw, you need to #include <tf/tf.h>

rosserial_arduino is NOT a full-featured ROS installation, so there are many features that don't work for the Arduino, and many things that are different.

In general, tutorials that describe standard ROS features do not apply to the Arduino.

In particular, array messages are raw C arrays; not vectors. Have a look at the rosserial Messages description, which shows how to properly initialize a JointState message on the arduino.

I don't see it in the documentation, but I believe that in order to get tf::createQuaternionFromYaw, you need to #include <tf/tf.h>

Update

It looks like you've made progress. You don't show the includes that you're using, but since the compiler is complaining about jstate it seems like you haven't included the header for the joint state message either. You probably need #include <sensor_msgs/JointState.h>

rosserial_arduino is NOT a full-featured ROS installation, so there are many features that don't work for the Arduino, and many things that are different.

In general, tutorials that describe standard ROS features do not apply to the Arduino.

In particular, array messages are raw C arrays; not vectors. Have a look at the rosserial Messages description, which shows how to properly initialize a JointState message on the arduino.

I don't see it in the documentation, but I believe that in order to get tf::createQuaternionFromYaw, you need to #include <tf/tf.h>

Update

It looks like you've made progress. You don't show the includes that you're using, but since the compiler is complaining about jstate it seems like you haven't included the header for the joint state message either. You probably need #include <sensor_msgs/JointState.h>

Update2

You don't need to initialize your messages and your NodeHandle in a particular order, but the message initialization does need to happen inside a function. You can have variable declarations outside a function, but you can't have other statements outside of a function. (This is a general rule in C and C++; not specific to rosserial or Arduino)