Functions | Variables
adk_demo.cpp File Reference
#include <Wire.h>
#include <Servo.h>
#include <CapSense.h>
#include <ros.h>
#include <std_msgs/UInt16.h>
#include <std_msgs/Bool.h>
#include <std_msgs/Float32.h>
#include <rosserial_adk_demo_msgs/Led.h>
#include <sensor_msgs/Joy.h>
#include "Button.h"
#include "adk_shield.h"
Include dependency graph for adk_demo.cpp:

Go to the source code of this file.

Functions

template<int ledr, int ledg, int ledb>
void led_cb (const rosserial_adk_demo_msgs::Led &led)
void loop ()
template<int relay_pin>
void relay_cb (const std_msgs::Bool &cmd)
template<Servo * servo, int i>
void servo_cb (const std_msgs::UInt16 &cmd)
void setup ()

Variables

float axes [2]
Button button1 (BUTTON1)
Button button2 (BUTTON2)
Button button3 (BUTTON3)
Button button_joy (JOY_SWITCH)
std_msgs::Bool button_msg
Buttonbuttons [4]
char frame_id [] = "joy_stick"
sensor_msgs::Joy joy_msg
unsigned long joy_pub_time
std_msgs::UInt16 light_msg
unsigned long light_pub_time
ros::NodeHandle nh
ros::Publisher pub_button1 ("button1",&button_msg)
ros::Publisher pub_button2 ("button2",&button_msg)
ros::Publisher pub_button3 ("button3",&button_msg)
ros::Publisher pub_button_joy ("button_joy",&button_msg)
ros::Publisherpub_buttons [4]
ros::Publisher pub_joy ("joy",&joy_msg)
ros::Publisher pub_light ("light",&light_msg)
ros::Publisher pub_temp ("temperature",&temp_msg)
ros::Publisher pub_touch ("touch",&touch_msg)
ros::Subscriber
< rosserial_adk_demo_msgs::Led
sub_led_1 ("led1", led_cb< LED1_RED, LED1_GREEN, LED1_BLUE >)
ros::Subscriber
< rosserial_adk_demo_msgs::Led
sub_led_2 ("led2", led_cb< LED2_RED, LED2_GREEN, LED2_BLUE >)
ros::Subscriber
< rosserial_adk_demo_msgs::Led
sub_led_3 ("led3", led_cb< LED3_RED, LED3_GREEN, LED3_BLUE >)
ros::Subscriber< std_msgs::Bool > sub_relay1 ("relay1", relay_cb< RELAY1 >)
ros::Subscriber< std_msgs::Bool > sub_relay2 ("relay2", relay_cb< RELAY2 >)
ros::Subscriber< std_msgs::UInt16 > sub_servo0 ("servo/0", servo_cb< servos, 0 >)
ros::Subscriber< std_msgs::UInt16 > sub_servo1 ("servo/1", servo_cb< servos, 1 >)
ros::Subscriber< std_msgs::UInt16 > sub_servo2 ("servo/2", servo_cb< servos, 2 >)
std_msgs::Float32 temp_msg
unsigned long temp_pub_time
std_msgs::Bool touch_msg
unsigned long touch_robot_time

Function Documentation

template<int ledr, int ledg, int ledb>
void led_cb ( const rosserial_adk_demo_msgs::Led led)

Definition at line 49 of file adk_demo.cpp.

void loop ( )

Definition at line 134 of file adk_demo.cpp.

template<int relay_pin>
void relay_cb ( const std_msgs::Bool &  cmd)

Definition at line 62 of file adk_demo.cpp.

template<Servo * servo, int i>
void servo_cb ( const std_msgs::UInt16 &  cmd)

Definition at line 23 of file adk_demo.cpp.

void setup ( )

Definition at line 83 of file adk_demo.cpp.


Variable Documentation

float axes[2]

Definition at line 76 of file adk_demo.cpp.

std_msgs::Bool button_msg

Definition at line 31 of file adk_demo.cpp.

Definition at line 44 of file adk_demo.cpp.

char frame_id[] = "joy_stick"

Definition at line 77 of file adk_demo.cpp.

sensor_msgs::Joy joy_msg

Definition at line 75 of file adk_demo.cpp.

unsigned long joy_pub_time

Definition at line 130 of file adk_demo.cpp.

std_msgs::UInt16 light_msg

Definition at line 72 of file adk_demo.cpp.

unsigned long light_pub_time

Definition at line 129 of file adk_demo.cpp.

Definition at line 21 of file adk_demo.cpp.

ros::Publisher pub_button1("button1",&button_msg)
ros::Publisher pub_button2("button2",&button_msg)
ros::Publisher pub_button3("button3",&button_msg)
ros::Publisher pub_button_joy("button_joy",&button_msg)

Definition at line 45 of file adk_demo.cpp.

ros::Publisher pub_joy("joy",&joy_msg)
ros::Publisher pub_light("light",&light_msg)
ros::Publisher pub_temp("temperature",&temp_msg)
ros::Publisher pub_touch("touch",&touch_msg)
ros::Subscriber<std_msgs::Bool> sub_relay1("relay1", relay_cb< RELAY1 >)
ros::Subscriber<std_msgs::Bool> sub_relay2("relay2", relay_cb< RELAY2 >)
ros::Subscriber<std_msgs::UInt16> sub_servo0("servo/0", servo_cb< servos, 0 >)
ros::Subscriber<std_msgs::UInt16> sub_servo1("servo/1", servo_cb< servos, 1 >)
ros::Subscriber<std_msgs::UInt16> sub_servo2("servo/2", servo_cb< servos, 2 >)
std_msgs::Float32 temp_msg

Definition at line 69 of file adk_demo.cpp.

unsigned long temp_pub_time

Definition at line 128 of file adk_demo.cpp.

std_msgs::Bool touch_msg

Definition at line 80 of file adk_demo.cpp.

unsigned long touch_robot_time

Definition at line 131 of file adk_demo.cpp.



rosserial_adk_demo
Author(s): Adam Stambler
autogenerated on Mon Dec 2 2013 12:02:02