Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: PwmIn IONMcMotor MPU6050 Eigen ROVER
Fork of Hyfliers_Completo_testato by
Diff: Robots/ARM/ArmControl/SafeCheck.h
- Revision:
- 6:584653235830
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Robots/ARM/ArmControl/SafeCheck.h Tue Sep 14 11:18:35 2021 +0000
@@ -0,0 +1,41 @@
+#ifndef SAFE_CHECK_H
+#define SAFE_CHECK_H
+
+#include "mbed.h"
+#include <Eigen/Dense.h>
+#include "ARAP180_with_rover.h"
+
+using namespace Eigen;
+
+class SafeCheck
+{
+public:
+
+ enum checkMode {
+ JOINT_MODE,
+ CARTESIAN_MODE,
+ };
+
+ SafeCheck(ARAP180_WITH_ROVER *_arm, VectorXf _maxJointPos,VectorXf _minJointPos, VectorXf _maxJointVel, VectorXf _maxJointAcc, Vector3f _maxCartPos, Vector3f _minCartPos);
+ void setSafeCheckParameters(VectorXf _maxJointPos,VectorXf _minJointPos, VectorXf _maxJointVel, VectorXf _maxJointAcc, Vector3f _maxCartPos, Vector3f _minCartPos);
+ void initSafeCheck();
+ bool check(VectorXf q, VectorXf dq, VectorXf ddq, checkMode mode);
+
+
+
+
+private:
+ ARAP180_WITH_ROVER *arm;
+
+ VectorXf maxJointPos;
+ VectorXf minJointPos;
+ VectorXf maxJointVel;
+ VectorXf maxJointAcc;
+ Vector3f maxCartPos;
+ Vector3f minCartPos;
+
+ bool isSafe;
+
+};
+
+#endif
