#include <stdio.h>
#include <ros/ros.h>
#include <std_msgs/Float64.h>
#include <std_msgs/Float64MultiArray.h>

void signalInCallback(const std_msgs::Float64 msg)
{
   double signal;
   signal = msg.data;
   //printf("REC:%f",signal);
}


int main(int argc, char **argv)
{
    ros::init(argc, argv, "traj_node"); //registers node with ROS master
    ros::NodeHandle n;  //get the handle for node
//    ros::NodeHandle n("~");  //get the handle for node
    ros::Rate loop_rate(50);  //define rate for repeatable operations
    ros::Subscriber signal_in = n.subscribe("signal", 1000, signalInCallback); 

    while (ros::ok())
    {
        ros::spinOnce();  //process all incoming messages
        loop_rate.sleep();  //wait until defined time passes.
	
    }
}
