Skip to content

Commit

Permalink
removed equating refs to positions and also unneeded couts
Browse files Browse the repository at this point in the history
  • Loading branch information
vigisushrutha23 authored and ergocub committed Dec 17, 2024
1 parent 9b9aa25 commit 5c0e3e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/BimanualControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ bool BimanualControl::move_to_poses(const std::vector<Eigen::Isometry3d> &left,
bool BimanualControl::move_object(const Eigen::Isometry3d &pose,
const double &time)
{
std::cout<<"\n Move Object called";

if(not this->isGrasping)
{
std::cerr << "[ERROR] [BIMANUAL CONTROL] move_object(): "
Expand Down Expand Up @@ -421,13 +421,13 @@ bool BimanualControl::move_object(const Eigen::Isometry3d &pose,

std::vector<double> times;
times.push_back(time);
std::cout<<"Setting initial and Previous Object Pose)";


return move_object(poses,times);
}

else
{ std::cout <<"\n New pose given \n"<< pose.translation();
{
Eigen::Matrix<double,6,1> change_in_pose = pose_error(pose,this->previousObjectPose);
if(change_in_pose.block(0,0,3,1).norm()>0.02 || change_in_pose.block(3,0,3,1).norm()>0.1)
{
Expand Down Expand Up @@ -463,7 +463,7 @@ bool BimanualControl::move_object(const std::vector<Eigen::Isometry3d> &poses,

return false;
}
std::cout<<"Moving object through poses";

Eigen::Vector<double,6> leftHandTwist = iDynTree::toEigen(this->computer.getFrameVel("left"));
Eigen::Vector3d angularVel = leftHandTwist.tail(3);

Expand Down Expand Up @@ -650,7 +650,7 @@ bool BimanualControl::threadInit()

this->startTime = yarp::os::Time::now(); // Used to time the control loop

this->jointRef = this->jointPos; // Reference position = current position
//this->jointRef = this->jointPos; // Reference position = current position

return true; // jumps immediately to run()
}
Expand Down Expand Up @@ -874,7 +874,7 @@ void BimanualControl::run()
////////////////////////////////////////////////////////////////////////////////////////////////////
void BimanualControl::threadRelease()
{
this->jointRef = this->jointPos;
//this->jointRef = this->jointPos;
}

////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 0 additions & 1 deletion src/ControlServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class ControlServer : public ControlInterface
if(custom_continuous_action)
{
std::string reset="reset";
std::cout<<"\n Sending custom action \n";
Eigen::Isometry3d init_pose_to_new = this->robot->getInitialGraspObjectPose();
init_pose_to_new.translate(Eigen::Vector3d(object_pose[0],object_pose[1],object_pose[2]));
init_pose_to_new.rotate(Eigen::AngleAxisd(object_pose[3],Eigen::Vector3d::UnitX()));
Expand Down

0 comments on commit 5c0e3e0

Please sign in to comment.