Skip to content

Commit 2317f17

Browse files
committed
Fixed rosserial compilation isues in actuator
1 parent 3744edf commit 2317f17

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pio_workspace/src/actuator_main.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#ifdef ACTUATOR_H
2+
23
#include "actuator_main.h"
4+
5+
#include <Arduino.h>
6+
37
#include <Servo.h>
8+
49
#include <ros.h>
510
#include <std_msgs/UInt16.h>
611
#include <std_msgs/Bool.h>
@@ -9,7 +14,7 @@
914
const int SERVO_PIN = 9;
1015

1116
// create node handle
12-
ros::NodeHandle nh("actuator-grabber");
17+
ros::NodeHandle nh;
1318

1419
// create grabber servo object
1520
Servo grabberServo;
@@ -74,8 +79,4 @@ void servoSweep_CB(const std_msgs::Bool& msg) {
7479
}
7580
}
7681

77-
// subscribe to topics
78-
ros::Subscriber<std_msgs::UInt16> grabberPositionSub("servo/position", &servoPosition_CB);
79-
ros::Subscriber<std_msgs::Bool> grabberSweepSub("servo/sweep", &servoSweep_CB);
80-
81-
#endif
82+
#endif

0 commit comments

Comments
 (0)