joint control update
@@ -675,7 +675,7 @@ std::vector<Trajectory> OpenManipulator::getGoalTrajectory()
return goal_trajectory_;
}
-void OpenManipulator::jointControl(bool flug_use_time = false)
+void OpenManipulator::jointControl(bool flug_use_time)
{
static float start_time = present_time_; //for use time
uint16_t step_time = uint16_t(floor(move_time_ / control_time_) + 1.0); //for use step cnt
@@ -735,9 +735,9 @@ void OpenManipulator::jointControl(bool flug_use_time = false)
tick_time = present_time_ - start_time;
if(tick_time < move_time_)
{
- goal_position = joint_trajectory_.getPosition(tick_time);
- goal_velocity = joint_trajectory_.getVelocity(tick_time);
- goal_acceleration = joint_trajectory_.getAcceleration(tick_time);
+ goal_position = joint_trajectory_->getPosition(tick_time);
+ goal_velocity = joint_trajectory_->getVelocity(tick_time);
+ goal_acceleration = joint_trajectory_->getAcceleration(tick_time);
if (platform_)
sendMultipleActuatorAngle(manipulator_.getAllActiveJointID(), goal_position);
@@ -753,16 +753,16 @@ void OpenManipulator::jointControl(bool flug_use_time = false)
previous_goal_.velocity = goal_velocity;
previous_goal_.acceleration = goal_acceleration;
- moving = true;
+ moving_ = true;
- if(update_joint_trajectory_flug)
- start_time = present_time_;
+// if(update_joint_trajectory_flug)
+// start_time = present_time_;
}
else
{
- goal_position = joint_trajectory_.getPosition(move_time_);
- goal_velocity = joint_trajectory_.getVelocity(move_time_);
- goal_acceleration = joint_trajectory_.getAcceleration(move_time_);
+ goal_position = joint_trajectory_->getPosition(move_time_);
+ goal_velocity = joint_trajectory_->getVelocity(move_time_);
+ goal_acceleration = joint_trajectory_->getAcceleration(move_time_);
if (platform_)
sendMultipleActuatorAngle(manipulator_.getAllActiveJointID(), goal_position);
@@ -773,7 +773,7 @@ void OpenManipulator::jointControl(bool flug_use_time = false)
if (platform_ == false)
manipulator_.setAllActiveJointAngle(goal_position);
}
- moving = false;
+ moving_ = false;
start_time = present_time_;
}
}
