December 2019
Intermediate to advanced
456 pages
11h 33m
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 dissect 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:
#include "ros/ros.h"
#include "std_msgs/Float64.h"
#include <iostream>
Here, the Float64 header is used to hold the position value message to the controller.
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 ...
Read now
Unlock full access