Commit d9a44935 authored by roangel's avatar roangel
Browse files

tried to fix it?

parent 767f318a
1,PPS_CF01,0/0/2M,0,-1.11965,0.674688,-0.2,-0.475825,1.29008,2
1,PPS_CF02,0/8/2M/E7E7E7E702,0,-1.38022,-0.405516,-0.2,-0.481301,0.485645,2
2,PPS_CF04,0/24/2M,1,-0.412714,-0.376959,-0.2,0.423148,0.384735,2
......@@ -49,6 +49,7 @@ float prevEstimate[9];
std::vector<float> setpoint(4);
float saturationThrust;
ros::Publisher followPublisher;
ros::Subscriber followSubscriber;
CrazyflieData previousLocation;
......@@ -209,6 +210,7 @@ void followCallback(const Setpoint& newSetpoint) {
setpoint[1] = newSetpoint.y;
setpoint[2] = newSetpoint.z;
setpoint[3] = newSetpoint.yaw;
ROS_INFO("received callback new setpoint from FollowN1Service/FollowTopic");
}
......@@ -232,7 +234,7 @@ int main(int argc, char* argv[]) {
if(student_id != 1)
{
// subscribe to n-1 setpoint
ros::Subscriber followSubscriber = nodeHandle.subscribe("/" + std::to_string(student_id - 1) + "/FollowN_1Service/FollowTopic", 1, followCallback);
followSubscriber = nodeHandle.subscribe("/" + std::to_string(student_id - 1) + "/FollowN_1Service/FollowTopic", 1, followCallback);
}
else
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment