Skip to content
Snippets Groups Projects
Commit db5e32e5 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Use Eigen::Ref

parent 5e6100b2
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ CartesianVelocityControllerWithRamp::CartesianVelocityControllerWithRamp(const V
setCurrentJointVelocity(currentJointVelocity);
}
void CartesianVelocityControllerWithRamp::setCurrentJointVelocity(const Eigen::VectorXf& currentJointVelocity)
void CartesianVelocityControllerWithRamp::setCurrentJointVelocity(const Eigen::Ref<const Eigen::VectorXf>& currentJointVelocity)
{
Eigen::MatrixXf jacobi = controller.ik->getJacobianMatrix(controller.tcp, mode);
Eigen::MatrixXf inv = controller.ik->computePseudoInverseJacobianMatrix(jacobi, controller.ik->getJacobiRegularization(mode));
......
......@@ -49,7 +49,7 @@ namespace armarx
CartesianVelocityControllerWithRamp(CartesianVelocityControllerWithRamp&&) = default;
CartesianVelocityControllerWithRamp& operator=(CartesianVelocityControllerWithRamp&&) = default;
void setCurrentJointVelocity(const Eigen::VectorXf& currentJointVelocity);
void setCurrentJointVelocity(const Eigen::Ref<const Eigen::VectorXf>& currentJointVelocity);
Eigen::VectorXf calculate(const Eigen::VectorXf& cartesianVel, float jointLimitAvoidanceScale, float dt);
Eigen::VectorXf calculate(const Eigen::VectorXf& cartesianVel, const Eigen::VectorXf& nullspaceVel, float dt);
......
......@@ -58,7 +58,7 @@ namespace armarx
);
void setCurrentJointVelocity(const Eigen::VectorXf& currentJointVelocity)
void setCurrentJointVelocity(const Eigen::Ref<const Eigen::VectorXf>& currentJointVelocity)
{
ctrlCartesianVelWithRamps.setCurrentJointVelocity(currentJointVelocity);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment