From 43e9061f559ff7aded03e08ad3f16bf26f979003 Mon Sep 17 00:00:00 2001 From: Irene Garcia Camacho <igarcia@iri.upc.edu> Date: Fri, 16 Jun 2017 18:02:54 +0200 Subject: [PATCH] Minor changes in walk and head_tracking modules. --- humanoid_modules/src/head_tracking_module.cpp | 3 +-- humanoid_modules/src/walk_module.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/humanoid_modules/src/head_tracking_module.cpp b/humanoid_modules/src/head_tracking_module.cpp index ead6714..4fc5dfd 100644 --- a/humanoid_modules/src/head_tracking_module.cpp +++ b/humanoid_modules/src/head_tracking_module.cpp @@ -32,8 +32,7 @@ CHeadTrackingModule::CHeadTrackingModule(const std::string &name) : CHumanoidMod this->head_target.velocities.resize(2); this->head_target.accelerations.resize(2); this->head_target.effort.resize(2); - this->head_target_timer=this->module_nh.createTimer(ros::Duration(1.0/this->config.head_target_rate_hz),&CHeadTrackingModule::head_target_pub,this); - this->head_target_timer.stop(); + this->head_target_timer=this->module_nh.createTimer(ros::Duration(1.0/this->config.head_target_rate_hz),&CHeadTrackingModule::head_target_pub,this,false,false); /* assign check callback functions to the PID services */ this->set_pan_pid_service.set_call_check_function(boost::bind(&CHeadTrackingModule::check_set_pid_service,this,_1)); this->get_pan_pid_service.set_call_check_function(boost::bind(&CHeadTrackingModule::check_get_pid_service,this,_1)); diff --git a/humanoid_modules/src/walk_module.cpp b/humanoid_modules/src/walk_module.cpp index 6e07636..90040a9 100644 --- a/humanoid_modules/src/walk_module.cpp +++ b/humanoid_modules/src/walk_module.cpp @@ -17,8 +17,7 @@ CWalkModule::CWalkModule(const std::string &name) : CHumanoidModule(name,WALK_MO this->cmd_vel_msg.angular.z=0.0; /* initiqalize the command velocity publisher */ this->cmd_vel_publisher=this->module_nh.advertise<geometry_msgs::Twist>("cmd_vel",1); - this->cmd_vel_timer=this->module_nh.createTimer(ros::Duration(1.0/this->config.cmd_vel_rate_hz),&CWalkModule::cmd_vel_pub,this); - this->cmd_vel_timer.stop(); + this->cmd_vel_timer=this->module_nh.createTimer(ros::Duration(1.0/this->config.cmd_vel_rate_hz),&CWalkModule::cmd_vel_pub,this,false,false); /* joint states subscriber */ this->joint_state_subscriber=this->module_nh.subscribe("joint_states",1,&CWalkModule::joint_state_callback,this); /* fallen state subscriber */ -- GitLab