March 2018
Intermediate to advanced
1396 pages
42h 14m
English
As we've already seen, the face tracker controller node is responsible for controlling the Dynamixel servo according to the face centroid position. Let's understand the code of this node, which is placed at face_tracker_control/src/face_tracker_controller.cpp.
The main ROS headers included in this code are as follows. Here, the Float64 header is used to hold the position value message to the controller:
#include "ros/ros.h"
#include "std_msgs/Float64.h"
#include <iostream>
The following variables hold the parameter values from servo_param.yaml:
int servomaxx, servomin,screenmaxx, center_offset, center_left,
center_right;
float servo_step_distancex, current_pos_x;
The following message headers of std_msgs::Float64 ...