Skip to content

Commit

Permalink
Merge pull request #118 from yujinrobot/enableCB_fix
Browse files Browse the repository at this point in the history
[diff_drive_pose_controller] Change target pose even if controller al…
  • Loading branch information
Marcus Liebhardt authored Oct 26, 2016
2 parents 38d4517 + ce834cb commit 0fa79d6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,18 @@ void DiffDrivePoseControllerROS::controlMaxVelCB(const std_msgs::Float32ConstPtr

void DiffDrivePoseControllerROS::enableCB(const std_msgs::StringConstPtr msg)
{
if (this->enable())
if (!msg->data.empty())
{
goal_frame_name_ = msg->data;
ROS_INFO_STREAM("Controller has been enabled. [" << name_ << "] with goal frame [" << goal_frame_name_ << "]");
}

if (this->enable())
{
ROS_INFO_STREAM("Controller has been enabled [" << name_ << "] with goal frame [" << goal_frame_name_ << "].");
}
else
{
ROS_INFO_STREAM("Controller was already enabled. [" << name_ <<"] with Goal frame [" << goal_frame_name_ << "]");
ROS_INFO_STREAM("Controller was already enabled [" << name_ <<"], now tracking goal frame [" << goal_frame_name_ << "].");
}
}

Expand Down

0 comments on commit 0fa79d6

Please sign in to comment.