Skip to content
Snippets Groups Projects
Commit c6f8d7ef authored by Fabian Reister's avatar Fabian Reister
Browse files

RobotUnit/KinematicSubUnit: +getDebugInfo

parent 0e77107f
No related branches found
No related tags found
1 merge request!273Kinematic Unit: new method to retrieve debug / all info at once
......@@ -21,6 +21,7 @@
*/
#include "KinematicSubUnit.h"
#include <RobotAPI/interface/units/KinematicUnitInterface.h>
#include <RobotAPI/libraries/RobotStatechartHelpers/KinematicUnitHelper.h>
#include <RobotAPI/components/units/RobotUnit/RobotUnit.h>
......@@ -392,6 +393,26 @@ Ice::StringSeq armarx::KinematicSubUnit::getJoints(const Ice::Current& c) const
return getMapKeys(ang);
}
armarx::DebugInfo armarx::KinematicSubUnit::getDebugInfo(const Ice::Current& c) const
{
std::lock_guard<std::mutex> guard {dataMutex};
armarx::DebugInfo debugInfo
{
.jointModes = ctrlModes,
.jointAngles = ang,
.jointVelocities = vel,
.jointAccelerations = acc,
.jointTorques = motorCurrents,
.jointCurrents = motorCurrents,
.jointMotorTemperatures = motorTemperatures,
.jointStatus = statuses
};
return debugInfo;
}
armarx::NJointControllerPtr armarx::KinematicSubUnit::ActuatorData::getController(armarx::ControlMode c) const
{
switch (c)
......
......@@ -85,6 +85,9 @@ namespace armarx
NameValueMap getJointVelocities(const Ice::Current&) const override;
Ice::StringSeq getJoints(const Ice::Current& c) const override;
DebugInfo getDebugInfo(const Ice::Current& c = Ice::emptyCurrent) const override;
void onInitKinematicUnit() override {}
void onStartKinematicUnit() override {}
void onExitKinematicUnit() override {}
......
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