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

gtm's profile - activity

2016-03-30 15:23:27 -0500 answered a question Publisher/Subscriber Node for Arduino Sensor Data

I was trying to suscribe "order" topic on new arduino but i was not able to do so. i have successfully published "order" topic and both of my arduino are working. I have following code on my second arduino. However i am not able to switch on LED based on the message received. I am new to ROS arduino programming. Can someone please help me to correct the code i have.

#include <ros.h> #include <std_msgs bool.h=""> ros::NodeHandle nh; const int ledPin = 13; boolean state; void messageCb( const std_msgs::Bool& pushed_msg){ if (state ==true) { digitalWrite(ledPin, HIGH); delayMicroseconds(100); digitalWrite(ledPin, LOW); } } ros::Subscriber<std_msgs::bool> sub("order", &messageCb ); void setup() { pinMode(ledPin, OUTPUT); nh.initNode(); nh.subscribe(sub); } void loop() {
nh.spinOnce(); delay(1); }

2016-03-30 14:29:10 -0500 commented question Publisher/Subscriber Node for Arduino Sensor Data

HI emreay! I have used your code and was trying to subscribe "order" topic on another arduino. i was not able to blink the led on arduino based on the massage received. I am new to ros programming can you please help me.

2016-03-26 10:03:03 -0500 commented question Phantom Omni / Geomagic Touch package compile error

I'm also interested in this solution - did you manage to make it working? I got following error while compiling "ROS Node for Sensable Phantom Omni device"on Ubuntu 14.04.4 LTS ROS Indigo (/usr/bin/ld: cannot find -lncurses collect2: error: ld returned 1 exit status)

2016-03-18 13:06:55 -0500 received badge  Enthusiast
2016-03-09 17:50:35 -0500 received badge  Supporter (source)