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
Robots/ARM/ArmControl/SafeCheck.h
- Committer:
 - anfontanelli
 - Date:
 - 2021-09-14
 - Revision:
 - 6:584653235830
 
File content as of revision 6:584653235830:
#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
            
    