<commit_before>
#include <std_msgs/String.h>
#include <std_msgs/Float64MultiArray.h>
#include <ensenso/HeadPose.h>
#include "nn_controller/amfcError.h"
#include "nn_controller/nn_controller.h"
#include <string>
#include <cmath>

using namespace amfc_control;

//constructor
Controller::Controller(ros::NodeHandle nc, const Eigen::Vector3d& ref)
: n_(nc), ref_(ref)
{	 		 
	initMatrices();
}

//copy constructor
Controller::Controller()
{
	start = std::chrono::high_resolution_clock::now();
}

// Destructor.
Controller::~Controller()
{
}

void Controller::set_update_delay(double new_step_length)
{
}

double Controller::get_update_delay()
{
    return 1.0;
}

void Controller::reset(ros::Time update_time)
{
}

void Controller::pose_subscriber(const ensenso::HeadPose& headPose)
{
	Eigen::VectorXd pose_info;

	pose_info.resize(6);		//CRITICAL OR SEGFAULT

	getPoseInfo(headPose, pose_info);
	
	OUT("pose_info: " << pose_info);

	ControllerParams();
}

void Controller::getPoseInfo(const ensenso::HeadPose& headPose, Eigen::VectorXd pose_info)
{
	pose_info << headPose.x, headPose.y,
				 headPose.z, headPose.pitch,
				 headPose.yaw, 0.0;   //setting roll to zero
				 
}
bool Controller::configure_controller(
	nn_controller::amfcError::Request  &req,
	nn_controller::amfcError::Response  &res)
{<commit_msg>constant parts of controller now being updated<commit_after>
#include <std_msgs/String.h>
#include <std_msgs/Float64MultiArray.h>
#include <ensenso/HeadPose.h>
#include "nn_controller/amfcError.h"
#include "nn_controller/nn_controller.h"
#include <string>
#include <cmath>

using namespace amfc_control;

//constructor
Controller::Controller(ros::NodeHandle nc, const Eigen::Vector3d& ref)
: n_(nc), ref_(ref)
{	 		 
	initMatrices();
}

//copy constructor
Controller::Controller()
{
	start = std::chrono::high_resolution_clock::now();
}

// Destructor.
Controller::~Controller()
{
}

void Controller::set_update_delay(double new_step_length)
{
}

double Controller::get_update_delay()
{
    return 1.0;
}

void Controller::reset(ros::Time update_time)
{
}

void Controller::pose_subscriber(const ensenso::HeadPose& headPose)
{
	Eigen::VectorXd pose_info;

	pose_info.resize(6);		//CRITICAL OR SEGFAULT

	getPoseInfo(headPose, pose_info);
	
	OUT("\npose_info: \n" << pose_info);

	ControllerParams();
}

void Controller::getPoseInfo(const ensenso::HeadPose& headPose, Eigen::VectorXd pose_info)
{
	pose_info << headPose.x, headPose.y,
				 headPose.z, headPose.pitch,
				 headPose.yaw, 0.0;   //setting roll to zero
				 
}
bool Controller::configure_controller(
	nn_controller::amfcError::Request  &req,
	nn_controller::amfcError::Response  &res)
{
{'fraction_non_alphanumeric': 0.13979706877113868, 'fraction_numerical': 0.006012777151446824, 'mean_word_length': 5.950391644908616, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1866253', 'n_tokens_mistral': 1012, 'n_tokens_neox': 963, 'n_words': 171}