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

s1's profile - activity

2015-12-23 12:23:06 -0500 commented answer Run multiple servo on ROS with arduino.

is it possible to delay servo2 so that I can time the action? In other words I dont want all of the servos to fire off at once.

2015-12-22 17:04:08 -0500 received badge  Famous Question (source)
2015-11-23 17:24:43 -0500 received badge  Popular Question (source)
2015-10-16 20:26:16 -0500 commented answer Run multiple servo on ROS with arduino.

thank you!!!

2015-09-30 01:28:32 -0500 received badge  Notable Question (source)
2015-09-29 16:36:54 -0500 received badge  Popular Question (source)
2015-09-29 14:33:26 -0500 commented answer ROS - Linear Actuators

Hi thanks for the response. I have gone thru the basic tutorials but I thought this was in the same section as "Servos". Will look into "Blink"

2015-09-29 14:10:06 -0500 asked a question ROS - Linear Actuators

ROS seems to have a library for servos but how would I control a Linear Actuator?

From this tutorial
http://learn.robotgeek.com/demo-code/...

It looks like an arduino can control an actuator with the use of push buttons, but how would i get feedback and signals to and from ROS, replacing push buttons with commands?

/* Linear Actuator Control using preset position

This demo shows how to do basic control of a large linear
actuator using an Arduino and two buttons. Each button is hard
coded with a preset position. Pressing a button will move
the actuator to that position.

 The circuit:
 * RobotGeek Pushbutton - Digital Pin 1
 * RobotGeek Pushbutton - Digital Pin 2
 * RobotGeek Relay - Digital Pin 4 
 * RobotGeek Relay - Digital Pin 7 

Products Used in this demo:
 - http://www.robotgeek.com/linear-actuators
 - http://www.robotgeek.com/robotgeek-geekduino-sensor-kit
 - http://www.robotgeek.com/robotGeek-pushbutton
 - http://www.robotgeek.com/robotgeek-relay

 */

// constants won't change. They're used here to set pin numbers:
const int button1Pin = 2;     // the number of the pushbutton1 pin
const int button2Pin = 4;     // the number of the pushbutton2 pin
const int relay1Pin =  7;      // the number of the Realy1 pin
const int relay2Pin =  8;      // the number of the Relay2 pin
const int sensorPin = 0;    // select the input pin for the potentiometer

// variables will change:
int button1State = 0;         // variable for reading the pushbutton status
int button2State = 0;         // variable for reading the pushbutton status
int sensorValue = 0;  // variable to store the value coming from the sensor

int goalPosition = 350; 
int CurrentPosition = 0; 
boolean Extending = false;
boolean Retracting = false;

void setup() {


        //start serial connection
        Serial.begin(9600);

        // initialize the pushbutton pin as an input:
        pinMode(button1Pin, INPUT);     
        pinMode(button2Pin, INPUT);    
        // initialize the relay pin as an output:
        pinMode(relay1Pin, OUTPUT);    
        pinMode(relay2Pin, OUTPUT);    

        //preset the relays to LOW
        digitalWrite(relay1Pin, LOW); 
        digitalWrite(relay2Pin, LOW); 


}

void loop(){

        // read the value from the sensor:
        CurrentPosition = analogRead(sensorPin); 


        // print the results to the serial monitor:
        Serial.print("Current = " );                       
        Serial.print(CurrentPosition);      
        Serial.print("\t Goal = ");      
        Serial.println(goalPosition);  

        // read the state of the pushbutton values:
        button1State = digitalRead(button1Pin);
        button2State = digitalRead(button2Pin);

        if (button1State == HIGH) {     
                // set new goal position
                goalPosition = 300; 

                if (goalPosition > CurrentPosition) {
                                Retracting = false;
                                Extending = true;
                                digitalWrite(relay1Pin, HIGH);  
                                digitalWrite(relay2Pin, LOW);  
                                Serial.println("Extending");     
                }      
                else if (goalPosition < CurrentPosition) {
                                Retracting = true;
                                Extending = false;
                                digitalWrite(relay1Pin, LOW);  
                                digitalWrite(relay2Pin, HIGH); 
                                Serial.println("Retracting");         
                }  
        }

        if (button2State == HIGH) {     
                // set new goal position
                goalPosition = 500; 

                if (goalPosition > CurrentPosition) {
                                Retracting = false;
                                Extending = true;
                                digitalWrite(relay1Pin, HIGH);  
                                digitalWrite(relay2Pin, LOW);  
                                Serial.println("Extending");   
                }        
                else if (goalPosition < CurrentPosition) {
                                Retracting = true;
                                Extending = false;
                                digitalWrite(relay1Pin, LOW);  
                                digitalWrite(relay2Pin, HIGH); 
                                Serial.println("Retracting");         
                }  
        }



        if (Extending = true && CurrentPosition > goalPosition) {
                //we have reached our goal, shut the relay off
                digitalWrite(relay1Pin, LOW); 
                boolean Extending = false; 
                Serial.println("IDLE");  
        }

        if (Retracting = true && CurrentPosition < goalPosition){
                //we have reached our goal, shut the relay off
                digitalWrite(relay2Pin, LOW); 
                boolean Retracting = false; 
                Serial.println("IDLE");  
        }




}
2015-09-22 08:58:11 -0500 received badge  Famous Question (source)
2015-09-22 08:33:57 -0500 commented question Python Numpy Error

Im getting an error: [rospack] Error: package 'numpy_tutorial' not found

2015-09-22 07:46:30 -0500 commented answer Run multiple servo on ROS with arduino.

can anyone give an example of MultiArray usage please.

2015-09-22 07:46:09 -0500 answered a question Run multiple servo on ROS with arduino.

can anyone give an example of MultiArray usage please.

2015-07-23 11:09:32 -0500 received badge  Famous Question (source)
2015-07-02 22:09:19 -0500 asked a question ROS on Android using ODROID-U3

The title says it all. I recently purchased a U3 board: http://www.hardkernel.com/main/produc... and would like to run ROS. However following these directions: http://wiki.ros.org/android/Android%2... It asks for Command Line as if this was Ubuntu. How am I supposed to install ROS on Android?

2015-06-11 16:01:45 -0500 commented question ROS on raspberrypie

a link to the tutorial?

2015-06-03 08:14:18 -0500 received badge  Enthusiast
2015-06-02 14:01:04 -0500 received badge  Notable Question (source)
2015-06-01 00:57:02 -0500 received badge  Popular Question (source)
2015-05-31 10:30:01 -0500 asked a question upgrade from Indigo to Jade

Is it important to upgrade Indigo to Jade Turtle? If so how do I do this?

2015-05-22 20:28:04 -0500 commented question ROS in Xcode

please share any workaround ideas you might have come across

2015-04-27 09:55:29 -0500 commented answer rosrun beginner_tutorials error

I thought catkin_make took care of compiling node changes

2015-04-27 08:50:16 -0500 received badge  Notable Question (source)
2015-04-24 12:28:31 -0500 received badge  Popular Question (source)
2015-04-24 09:28:26 -0500 received badge  Scholar (source)
2015-04-24 09:28:15 -0500 commented answer rosrun beginner_tutorials error

when do i need to "source" catkin_ws? in other words what would cause me to have to do this?

2015-04-23 21:09:28 -0500 asked a question rosrun beginner_tutorials error

I am following the beginner tutorial, when I run

roscore

then from within catkin_ws I run

catkin_make

rosrun beginner_tutorials talker

I am geting an error

[rospack] Error: package 'beginner_tutorials' not found

what would cause this error?
could it be file ownership? so far everything was thru command line but after i installed eclipse this error started happening.

when i run

rosrun roscpp_tutorials talker

it runs ok but I am not sure where this package resides.

FIXED : http://answers.ros.org/question/71260...

2015-04-23 20:19:17 -0500 received badge  Supporter (source)