Skip to content

Commit 54b2ae5

Browse files
committed
Updated documentation
1 parent c9134d1 commit 54b2ae5

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

Control/src/SerialKinematicControl.cpp

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
* @file SerialKinematicControl.cpp
33
* @author Jon Woolfrey
44
5-
* @date February 2025
6-
* @version 1.0
5+
* @date July 2025
6+
* @version 1.1
77
* @brief Computes velocity (position) feedback control for a serial link robot arm.
88
*
99
* @details This class contains methods for performing velocity control of a serial link robot arm
1010
* in both Cartesian and joint space. The fundamental feedforward + feedback control is given by:
1111
* control velocity = desired velocity + gain * (desired position - actual position).
1212
*
13-
* @copyright Copyright (c) 2025 Jon Woolfrey
14-
*
15-
* @license GNU General Public License V3
13+
* @copyright (c) 2025 Jon Woolfrey
14+
*
15+
* @license OSCL - Free for non-commercial open-source use only.
16+
* Commercial use requires a license.
1617
*
1718
* @see https://github.com/Woolfrey/software_robot_library for more information.
1819
* @see https://github.com/Woolfrey/software_simple_qp for the optimisation algorithm used in the control.
@@ -30,10 +31,14 @@ SerialKinematicControl::track_endpoint_trajectory(const RobotLibrary::Model::Pos
3031
const Eigen::Vector<double,6> &desiredVelocity,
3132
const Eigen::Vector<double,6> &desiredAcceleration)
3233
{
33-
(void)desiredAcceleration; // Not needed in velocity control
34-
34+
(void)desiredAcceleration; // Not needed in velocity control
35+
36+
// NOTE: This method saves the magnitude of position and orientation error internally,
37+
// so it can be queried after for analysing performance
38+
Eigen::Vector<double,6> poseError = pose_error(desiredPose);
39+
3540
return resolve_endpoint_motion(desiredVelocity // Feedforward term
36-
+ _cartesianStiffness * _endpointPose.error(desiredPose)); // Feedback term
41+
+ _cartesianPoseGain * poseError); // Feedback term
3742
}
3843

3944
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -226,4 +231,4 @@ SerialKinematicControl::compute_control_limits(const unsigned int &jointNumber)
226231
return limits;
227232
}
228233

229-
} }
234+
} } // namespace

0 commit comments

Comments
 (0)