repo
stringlengths
1
152
file
stringlengths
14
221
code
stringlengths
501
25k
file_length
int64
501
25k
avg_line_length
float64
20
99.5
max_line_length
int64
21
134
extension_type
stringclasses
2 values
Cheetah-Software
Cheetah-Software-master/third-party/SOEM/soem/ethercat.h
/* * Simple Open EtherCAT Master Library * * File : ethercat.h * Version : 1.3.1 * Date : 18-12-2015 * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f. * Copyright (C) 2005-2015 Arthur Ketels * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven * Copyright (C) 2014-2015 rt-labs A...
2,305
36.193548
83
h
Cheetah-Software
Cheetah-Software-master/third-party/SOEM/soem/ethercatdc.h
/* * Simple Open EtherCAT Master Library * * File : ethercatdc.h * Version : 1.3.1 * Date : 11-03-2015 * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f. * Copyright (C) 2005-2015 Arthur Ketels * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven * Copyright (C) 2014-2015 rt-labs...
2,601
36.171429
121
h
Cheetah-Software
Cheetah-Software-master/third-party/SOEM/soem/ethercatdc.c
/* * Simple Open EtherCAT Master Library * * File : ethercatdc.c * Version : 1.3.1 * Date : 11-03-2015 * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f. * Copyright (C) 2005-2015 Arthur Ketels * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven * Copyright (C) 2014-2015 rt-labs...
17,359
34.793814
124
c
Cheetah-Software
Cheetah-Software-master/third-party/SOEM/soem/ethercatmain.h
/* * Simple Open EtherCAT Master Library * * File : ethercatmain.h * Version : 1.3.1 * Date : 11-03-2015 * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f. * Copyright (C) 2005-2015 Arthur Ketels * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven * Copyright (C) 2014-2015 rt-la...
18,177
31.694245
105
h
Cheetah-Software
Cheetah-Software-master/third-party/SOEM/osal/osal.h
/****************************************************************************** * * *** *** * *** *** *** * *** **** ********** *** ***** *** **** ***** * ********* ********** *** ********* ...
2,480
33.943662
81
h
Cheetah-Software
Cheetah-Software-master/third-party/SOEM/osal/linux/osal.c
/* * Simple Open EtherCAT Master Library * * File : osal.h * Version : 1.3.1 * Date : 11-03-2015 * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f. * Copyright (C) 2005-2015 Arthur Ketels * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven * Copyright (C) 2012-2015 rt-labs AB , ...
5,220
28.331461
83
c
Cheetah-Software
Cheetah-Software-master/third-party/SOEM/osal/linux/osal_defs.h
/* * Simple Open EtherCAT Master Library * * File : osal_defs.h * Version : 1.3.1 * Date : 11-03-2015 * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f. * Copyright (C) 2005-2015 Arthur Ketels * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven * Copyright (C) 2012-2015 rt-labs ...
2,262
33.287879
83
h
Cheetah-Software
Cheetah-Software-master/common/include/cTypes.h
/*! @file cTypes.h * @brief Common types that can also be included in C code * * This file contains types which are shared between C and C++ code. The * low-level drivers (rt folder) are all in C and everything else is C++. * Because this file is included in both C and C++, it can't contain C++ type * alias ("...
717
25.592593
77
h
Cheetah-Software
Cheetah-Software-master/common/include/cppTypes.h
/*! @file cTypes.h * @brief Common types that are only valid in C++ * * This file contains types which are only used in C++ code. This includes * Eigen types, template types, aliases, ... */ #ifndef PROJECT_CPPTYPES_H #define PROJECT_CPPTYPES_H #include <vector> #include "cTypes.h" #include <eigen3/Eigen/Dens...
2,807
22.016393
76
h
Cheetah-Software
Cheetah-Software-master/common/include/Controllers/ContactEstimator.h
/*! @file ContactEstimator.h * @brief All Contact Estimation Algorithms * * This file will contain all contact detection algorithms. For now, it just * has a pass-through algorithm which passes the phase estimation to the state * estimator. This will need to change once we move contact detection to C++ * * W...
1,055
26.076923
78
h
Cheetah-Software
Cheetah-Software-master/common/include/Controllers/GaitScheduler.h
/*! * @file GaitScheduler.h * @brief Logic for fixed-gait timing */ #ifndef GAIT_SCHEDULER_H #define GAIT_SCHEDULER_H #include <iostream> #include "cppTypes.h" #include "../../user/MIT_Controller/MIT_UserParameters.h" /** * Enumerated gait types. Preplanned gaits are defined. */ enum class GaitType { STAND, ...
3,344
23.595588
79
h
Cheetah-Software
Cheetah-Software-master/common/include/Controllers/LegController.h
/*! @file LegController.h * @brief Common Leg Control Interface and Leg Control Algorithms * * Implements low-level leg control for Mini Cheetah and Cheetah 3 Robots * Abstracts away the difference between the SPIne and the TI Boards (the low level leg control boards) * All quantities are in the "leg frame" wh...
2,608
27.67033
104
h
Cheetah-Software
Cheetah-Software-master/common/include/Controllers/OrientationEstimator.h
/*! @file OrientationEstimator.h * @brief All Orientation Estimation Algorithms * * This file will contain all orientation algorithms. * Orientation estimators should compute: * - orientation: a quaternion representing orientation * - rBody: coordinate transformation matrix (satisfies vBody = Rbody * vWorld)...
1,207
26.454545
91
h
Cheetah-Software
Cheetah-Software-master/common/include/Controllers/DesiredStateCommand.h
/*! * @file DesiredStateCommand.h * @brief Logic to convert a joystick command into a desired trajectory for the robot * * This will generate a state trajectory which can easily be used for model predictive controllers */ /*========================= Gamepad Control ==========================*/ /** * */ #ifndef ...
3,081
22.891473
98
h
Cheetah-Software
Cheetah-Software-master/common/include/Controllers/StateEstimatorContainer.h
/*! * @file StateEstimator.h * @brief Implementation of State Estimator Interface * * Each StateEstimator object contains a number of estimators * * When the state estimator is run, it runs all estimators. */ #ifndef PROJECT_STATEESTIMATOR_H #define PROJECT_STATEESTIMATOR_H #include "ControlParameters/RobotPar...
4,930
24.417526
77
h
Cheetah-Software
Cheetah-Software-master/common/include/Controllers/PositionVelocityEstimator.h
/*! @file PositionVelocityEstimator.h * @brief All State Estimation Algorithms * * This file will contain all state estimation algorithms. * PositionVelocityEstimators should compute: * - body position/velocity in world/body frames * - foot positions/velocities in body/world frame */ #ifndef PROJECT_POSITI...
1,419
26.843137
87
h
Cheetah-Software
Cheetah-Software-master/common/include/Math/FirstOrderIIRFilter.h
/*! @file FirstOrderIIRFilter.h * @brief A simple first order filter * * */ #ifndef PROJECT_FIRSTORDERIIRFILTER_H #define PROJECT_FIRSTORDERIIRFILTER_H #include <cmath> /*! * First Order Filter * @tparam T : type of the data to be filtered * @tparam T2 : floating point type for the cutoff/sample frequencies,...
1,538
22.676923
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Math/Interpolation.h
/*! @file Interpolation.h * @brief Utility functions to interpolate between two values * */ #ifndef PROJECT_INTERPOLATION_H #define PROJECT_INTERPOLATION_H #include <assert.h> #include <type_traits> namespace Interpolate { /*! * Linear interpolation between y0 and yf. x is between 0 and 1 */ template <typena...
1,822
25.42029
79
h
Cheetah-Software
Cheetah-Software-master/common/include/Math/orientation_tools.h
/*! @file orientation_tools.h * @brief Utility functions for 3D rotations * * This file contains rotation utilities. We generally use "coordinate * transformations" as opposed to the displacement transformations that are * commonly found in graphics. To describe the orientation of a body, we use a * rotation ...
12,344
31.064935
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/pseudoInverse.h
#include <stdio.h> #include <eigen3/Eigen/LU> #include <eigen3/Eigen/SVD> using namespace std; /*! * Compute the pseudo inverse of a matrix * @param matrix : input matrix * @param sigmaThreshold : threshold for singular values being zero * @param invMatrix : output matrix */ template <typename T> void pseudoInver...
1,347
31.095238
75
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/save_file.h
#ifndef SAVE_FILE_H #define SAVE_FILE_H #include <Configuration.h> #include <cppTypes.h> #include <stdio.h> #include <sys/stat.h> #include <algorithm> #include <fstream> #include <iostream> #include <list> #include <string> static std::list<std::string> gs_fileName_string; // global & static void cleaning_file(cons...
2,259
27.25
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/BSplineBasic.h
#ifndef B_SPLINE_BASIC #define B_SPLINE_BASIC #include <assert.h> #include <stdio.h> #include <iostream> #define SP_IS_EQUAL(x, y) (((x) - (y)) * ((x) - (y)) < 1.e-10) #define SP_SAFE_DELETE_AR(p) \ if (p) { \ delete[] p; \ (p) = NULL; \ } /*! * Basic Bspline ...
12,165
25.276458
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/SharedMemory.h
/*! @file SharedMemory.h * @brief Shared memory utilities for connecting the simulator program to the * robot program * * */ #ifndef PROJECT_SHAREDMEMORY_H #define PROJECT_SHAREDMEMORY_H #include <fcntl.h> #include <semaphore.h> #include <sys/mman.h> #include <sys/stat.h> #include <unistd.h> #include <cassert> #...
9,711
28.34139
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/PeriodicTask.h
/*! * @file PeriodicTask.h * @brief Implementation of a periodic function running in a separate thread. * Periodic tasks have a task manager, which measure how long they take to run. */ #ifndef PROJECT_PERIODICTASK_H #define PROJECT_PERIODICTASK_H #include <string> #include <thread> #include <vector> class Perio...
3,168
21.316901
79
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/utilities.h
/*! * @file utilities.h * @brief Common utility functions */ #ifndef PROJECT_UTILITIES_H #define PROJECT_UTILITIES_H #include <algorithm> #include <map> #include <random> #include <unordered_map> #include <vector> #include "cppTypes.h" /*! * Are two floating point values almost equal? * @param a : first value ...
7,281
22.797386
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/BezierCurve.h
#ifndef BEZIER_CURVE #define BEZIER_CURVE #include <math.h> // N = NUM_CTR_PT -1 template <typename T, int DIM, int NUM_CTR_PT> class BezierCurve { public: T _CtrlPt[NUM_CTR_PT][DIM]; T _coeff[NUM_CTR_PT]; T _end_time; BezierCurve() { for (int j(0); j < NUM_CTR_PT; ++j) { for (int i(0); i < DIM; ++...
2,533
23.601942
78
h
Cheetah-Software
Cheetah-Software-master/common/include/Utilities/Utilities_print.h
/*! * @file Utilities_print.h * @brief Common utilities for printing */ #ifndef PRINT_OUT_H #define PRINT_OUT_H #include <stdarg.h> #include <stdio.h> #include <iostream> #include <string> #include "cppTypes.h" /*! * Floating point value to string. */ template <typename T> std::string pretty_string(T vv) { st...
3,986
28.753731
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/FloatingBaseModel.h
/*! @file FloatingBaseModel.h * @brief Implementation of Rigid Body Floating Base model data structure * * This class stores the kinematic tree described in "Rigid Body Dynamics * Algorithms" by Featherstone (download from * https://www.springer.com/us/book/9780387743141 on MIT internet) * * The tree includes a...
8,663
27.88
81
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/DynamicsSimulator.h
/*! @file DynamicsSimulator.h * @brief Rigid Body Dynamics Simulator with Collisions * * Combines ABA, Collisions, integrator, and any other external forces to run a * simulation. Doesn't do any graphics. */ #ifndef PROJECT_DYNAMICSSIMULATOR_H #define PROJECT_DYNAMICSSIMULATOR_H #include "cppTypes.h" #include ...
5,145
27.748603
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/ActuatorModel.h
/*! @file ActuatorModel.h * @brief Model of actuator * Includes friction, max torque, and motor torque speed curve. * * The getTorque is used for torque at the joint, not torque at the motor. * The provided frictions are for torques at the joint, not torque at the motor * The R/KT are for the motor */ #ifn...
2,657
30.270588
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/SpatialInertia.h
/*! @file SpatialInertia.h * @brief Class representing spatial inertia tensors * */ #ifndef LIBBIOMIMETICS_SPATIALINERTIA_H #define LIBBIOMIMETICS_SPATIALINERTIA_H #include <cmath> #include <iostream> #include <type_traits> #include "Math/orientation_tools.h" #include "spatial.h" using namespace ori; using name...
5,085
28.229885
77
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/spatial.h
/*! @file spatial.h * @brief Utility functions for manipulating spatial quantities * * This file contains functions for working with spatial vectors and * transformation matrices. */ #ifndef LIBBIOMIMETICS_SPATIAL_H #define LIBBIOMIMETICS_SPATIAL_H #include <cmath> #include <iostream> #include <type_traits> #...
12,255
32.950139
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/Cheetah3.h
/*! @file Cheetah3.h * @brief Utility function to build a Cheetah 3 Quadruped object * * This file is based on Cheetah3FullRotorModel_mex.m (originally written by * Pat) and builds a model of the Cheetah 3 robot. The inertia parameters of * legs and rotors were determined through an experimental procedure descr...
5,008
41.092437
80
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/Quadruped.h
/*! @file Quadruped.h * @brief Data structure containing parameters for quadruped robot * * This file contains the Quadruped class. This stores all the parameters for * a quadruped robot. There are utility functions to generate Quadruped objects * for Cheetah 3 (and eventually mini-cheetah). There is a buildMo...
3,254
29.138889
87
h
Cheetah-Software
Cheetah-Software-master/common/include/Dynamics/MiniCheetah.h
/*! @file MiniCheetah.h * @brief Utility function to build a Mini Cheetah Quadruped object * * This file is based on MiniCheetahFullRotorModel_mex.m and builds a model * of the Mini Cheetah robot. The inertia parameters of all bodies are * determined from CAD. * */ #ifndef PROJECT_MINICHEETAH_H #define PROJEC...
4,387
37.156522
103
h
Cheetah-Software
Cheetah-Software-master/common/include/ControlParameters/ControlParameters.h
/*! @file ControlParameters.h * @brief Interface to set gains/control parameters for simulator and robot * These are designed to be updated infrequently. For high frequency data, * consider using Driver Inputs or adding to the Robot Debug Data instead. * * ControlParameter: a single value, either a double, floa...
17,199
29.335097
113
h
Cheetah-Software
Cheetah-Software-master/common/include/ControlParameters/RobotParameters.h
/*! @file RobotParameters.cpp * @brief Declaration of various robot parameters * * This class contains all the ControlParameters which are shared between all robot controllers * Currently there are some controlParameters that are specific to the MIT controllers here, * but these will be moved in the future */...
2,348
33.544118
96
h
Cheetah-Software
Cheetah-Software-master/common/include/ControlParameters/ControlParameterInterface.h
/*! @file ControlParameterInterface.h * @brief Types to allow remote access of control parameters, for use with * LCM/Shared memory * * There are response/request messages. The robot receives request messages and * responds with response messages The request messages either request setting a * parameter or gett...
4,538
33.915385
80
h
Cheetah-Software
Cheetah-Software-master/common/include/ControlParameters/SimulatorParameters.h
/*! @file SimulatorParameters.cpp * @brief Declaration of various simulator parameters * * This class contains all the ControlParameters for the simulator. * In most cases, the simulator just loads the control parameters in * simulator-defaults.ini and this is okay */ #ifndef PROJECT_SIMULATORPARAMETERS_H #de...
2,623
33.526316
69
h
Cheetah-Software
Cheetah-Software-master/common/include/SimUtilities/ti_boardcontrol.h
/*! @file ti_boardcontrol.h * @brief TI Board Code, used to simulate the TI board * * This is mostly a copy of the exact code that runs on the TI Board */ #ifndef TI_BOARDCONTROL_H #define TI_BOARDCONTROL_H #include "cTypes.h" /*! * Command sent to TI board */ struct TiBoardCommand { float position_des[3];...
1,985
21.827586
77
h
Cheetah-Software
Cheetah-Software-master/common/include/SimUtilities/GamepadCommand.h
/*! @file GamepadCommand.h * @brief The GamepadCommand type containing joystick information */ #ifndef PROJECT_GAMEPADCOMMAND_H #define PROJECT_GAMEPADCOMMAND_H #include "Utilities/utilities.h" #include "cppTypes.h" #include "gamepad_lcmt.hpp" /*! * The state of the gamepad */ struct GamepadCommand { /*! *...
4,199
29.882353
80
h
Cheetah-Software
Cheetah-Software-master/common/include/SimUtilities/ImuSimulator.h
/*! @file ImuSimulator.h * @brief Simulated IMU with noise */ #ifndef PROJECT_IMUSIMULATOR_H #define PROJECT_IMUSIMULATOR_H #include <random> #include "ControlParameters/SimulatorParameters.h" #include "Dynamics/FloatingBaseModel.h" #include "SimUtilities/IMUTypes.h" #include "cppTypes.h" /*! * Simulation of IM...
2,114
34.25
78
h
Cheetah-Software
Cheetah-Software-master/common/include/SimUtilities/SimulatorMessage.h
/*! @file SimulatorMessage.h * @brief Messages sent to/from the development simulator * * These messsages contain all data that is exchanged between the robot program * and the simulator using shared memory. This is basically everything except * for debugging logs, which are handled by LCM instead */ #ifndef...
3,822
26.503597
80
h
Cheetah-Software
Cheetah-Software-master/common/include/SparseCMPC/SparseCMPC.h
#ifndef CHEETAH_SOFTWARE_SPARSECMPC_H #define CHEETAH_SOFTWARE_SPARSECMPC_H #include "GraphSearch.h" #include "cppTypes.h" #include "../../../third-party/JCQP/SparseMatrixMath.h" struct BblockID { u32 foot; u32 timestep; }; class SparseCMPC { public: SparseCMPC(); void run(); // setup methods template<...
3,084
22.371212
73
h
Cheetah-Software
Cheetah-Software-master/common/include/Collision/CollisionPlane.h
/*! * @file CollisionPlane.h * @brief Collision logic for an infinite plane * * Simplest collision, used for floor and global bounding box */ #ifndef COLLISIONPLANE_H #define COLLISIONPLANE_H #include <vector> #include "Collision/Collision.h" #include "cppTypes.h" /*! * Class to represent infinite collision p...
988
22
70
h
Cheetah-Software
Cheetah-Software-master/common/include/Collision/ContactSpringDamper.h
/*! * @file ContactSpringDamper.h * @brief Spring Damper based Contact dynamics */ #ifndef CONTACT_SPRING_DAMPER_H #define CONTACT_SPRING_DAMPER_H #include "ContactConstraint.h" #include "Dynamics/FloatingBaseModel.h" /*! * Class representing contact dynamics for a FloatingBaseModel * This computes external for...
1,703
27.4
85
h
Cheetah-Software
Cheetah-Software-master/common/include/Collision/CollisionMesh.h
/*! * @file CollisionMesh.h * @brief Collision logic for a mesh/height map */ #ifndef COLLISION_MESH_H #define COLLISION_MESH_H #include <vector> #include "Collision/Collision.h" #include "Utilities/utilities.h" #include "cppTypes.h" /*! * Class to represent mesh collision */ template <typename T> class Collis...
1,406
23.258621
79
h
Cheetah-Software
Cheetah-Software-master/common/include/Collision/ContactConstraint.h
/*! * @file ContactConstraint.h * @brief Virtual class of Contact Constraint logic * * To make a child class, you need to implement virtual function, * UpdateExternalForces, UpdateQdot */ #ifndef CONTACT_CONSTRAINT_H #define CONTACT_CONSTRAINT_H #include <iostream> #include "Collision/Collision.h" #include "Dy...
2,738
24.839623
79
h
Cheetah-Software
Cheetah-Software-master/common/include/Collision/ContactImpulse.h
/*! * @file ContactImpulse.h * @brief Implementation of impulse-based contact dynamics * * These are the default contact dynamics of the simulator. */ #ifndef CONTACT_IMPULSE_H #define CONTACT_IMPULSE_H #include "ContactConstraint.h" #include "Dynamics/FloatingBaseModel.h" /*! * Impulse-based contact dynamics ...
1,917
25.638889
88
h
Cheetah-Software
Cheetah-Software-master/common/include/Collision/CollisionBox.h
/*! * @file CollisionBox.h * @brief Collision logic for a box */ #ifndef COLLISION_BOX_H #define COLLISION_BOX_H #include <vector> #include "Collision/Collision.h" #include "Utilities/utilities.h" #include "cppTypes.h" /*! * Class to represent box collision */ template <typename T> class CollisionBox : public ...
1,342
23.87037
79
h
Cheetah-Software
Cheetah-Software-master/common/include/Collision/Collision.h
/*! @file Collision.h * @brief Virtual class of Collision logic * * To make a child class, you need to implement virtual function, * ContactDetection, which checks if a point is in contact with the geometry */ #ifndef COLLISION_H #define COLLISION_H #include "cppTypes.h" /*! * Abstract Collision Class */ tem...
1,244
26.065217
80
h
Cheetah-Software
Cheetah-Software-master/robot/include/RobotRunner.h
/*! * @file RobotRunner.h * @brief Common framework for running robot controllers. * This code is a common interface between control code and hardware/simulation * for mini cheetah and cheetah 3 */ #ifndef PROJECT_ROBOTRUNNER_H #define PROJECT_ROBOTRUNNER_H #include "ControlParameters/ControlParameterInterface.h...
2,500
28.423529
79
h
Cheetah-Software
Cheetah-Software-master/robot/include/HardwareBridge.h
/*! * @file HardwareBridge.h * @brief Interface between robot code and robot hardware * * This class initializes the hardware of both robots and allows the robot * controller to access it */ #ifndef PROJECT_HARDWAREBRIDGE_H #define PROJECT_HARDWAREBRIDGE_H #ifdef linux #define MAX_STACK_SIZE 16384 // 16KB o...
3,519
26.076923
81
h
Cheetah-Software
Cheetah-Software-master/robot/include/RobotController.h
/*! * @file RobotController.h * @brief Parent class of user robot controllers. * This is an interface between the control code and the common hardware code */ #ifndef ROBOT_CONTROLLER_H #define ROBOT_CONTROLLER_H #include "Controllers/LegController.h" #include "Dynamics/FloatingBaseModel.h" #include "Controllers/...
1,406
27.14
77
h
Cheetah-Software
Cheetah-Software-master/robot/include/SimulationBridge.h
/*! @file SimulationBridge.h * @brief The SimulationBridge runs a RobotController and connects it to a * Simulator, using shared memory. It is the simulation version of the * HardwareBridge. */ #ifndef PROJECT_SIMULATIONDRIVER_H #define PROJECT_SIMULATIONDRIVER_H #include <thread> #include "ControlParameters/R...
1,457
26.509434
82
h
Cheetah-Software
Cheetah-Software-master/robot/include/rt/rt_rc_interface.h
/** * @file rt_rc_interface.h * */ #ifndef _RT_RC_INTERFACE #define _RT_RC_INTERFACE #include <chrono> class rc_control_settings { public: double mode; double p_des[2]; // (x, y) -1 ~ 1 double height_variation; // -1 ~ 1 double v_des[3]; // -1 ~ 1 * (scale 0.5 ~ 1.5) double ...
1,054
21.934783
80
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/MIT_UserParameters.h
#ifndef PROJECT_MITUSERPARAMETERS_H #define PROJECT_MITUSERPARAMETERS_H #include "ControlParameters/ControlParameters.h" class MIT_UserParameters : public ControlParameters { public: MIT_UserParameters() : ControlParameters("user-parameters"), INIT_PARAMETER(cmpc_gait), INIT_PARAMETER(cmpc_x_d...
6,140
34.912281
54
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/Controllers/convexMPC/Gait.h
#ifndef PROJECT_GAIT_H #define PROJECT_GAIT_H #include <string> #include <queue> #include "cppTypes.h" class Gait { public: virtual ~Gait() = default; virtual Vec4<float> getContactState() = 0; virtual Vec4<float> getSwingState() = 0; virtual int* getMpcTable() = 0; virtual void setIterations(int iterati...
2,093
24.851852
99
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/Controllers/convexMPC/ConvexMPCLocomotion.h
#ifndef CHEETAH_SOFTWARE_CONVEXMPCLOCOMOTION_H #define CHEETAH_SOFTWARE_CONVEXMPCLOCOMOTION_H #include <Controllers/FootSwingTrajectory.h> #include <FSM_States/ControlFSMData.h> #include <SparseCMPC/SparseCMPC.h> #include "cppTypes.h" #include "Gait.h" #include <cstdio> using Eigen::Array4f; using Eigen::Array4i; ...
4,060
22.748538
120
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/Controllers/VisionMPC/VisionRobotState.h
#ifndef Vision_RobotState #define Vision_RobotState #include <eigen3/Eigen/Dense> #include "../convexMPC/common_types.h" using Eigen::Matrix; using Eigen::Quaternionf; class VisionRobotState { public: void set(flt* p, flt* v, flt* q, flt* w, flt* r, flt yaw); //void compute_rotations(); v...
570
20.148148
66
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/Controllers/VisionMPC/VisionMPCLocomotion.h
#ifndef CHEETAH_SOFTWARE_VISION_MPCLOCOMOTION_H #define CHEETAH_SOFTWARE_VISION_MPCLOCOMOTION_H #include <Controllers/FootSwingTrajectory.h> #include <FSM_States/ControlFSMData.h> #include "cppTypes.h" using Eigen::Array4f; using Eigen::Array4i; class VisionGait { public: VisionGait(int nMPC_segments, Vec4<int> o...
2,755
24.518519
101
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/Controllers/BalanceController/BalanceControllerWrapper.h
#ifndef BALANCECONTROLLERWRAPPER_H #define BALANCECONTROLLERWRAPPER_H #ifdef __cplusplus extern "C" { #endif void balanceControl_init(); void balanceControl_set_desiredTrajectoryData( double* rpy_des_in, double* p_des_in, double* omegab_des_in, double* v_des_in); //, double *vdot_des_in); void balanceControl...
1,423
36.473684
72
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/ControlFSMData.h
#ifndef CONTROLFSMDATA_H #define CONTROLFSMDATA_H #include <ControlParameters/RobotParameters.h> #include <MIT_UserParameters.h> #include "Controllers/DesiredStateCommand.h" #include "Controllers/GaitScheduler.h" #include "Controllers/LegController.h" #include "Controllers/StateEstimatorContainer.h" #include "Dynamics...
854
26.580645
48
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_RLJointPD.h
#ifndef FSM_STATE_RLJOINTPD_H #define FSM_STATE_RLJOINTPD_H #include "FSM_State.h" #include <cstring> #include <experimental/filesystem> #include "cpuMLP.hpp" #include "../common/include/Controllers/StateEstimatorContainer.h" #include "../common/include/Controllers/LegController.h" #define OBSDIM 141 // TODO #define ...
2,374
27.963415
119
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/SafetyChecker.h
#ifndef SAFETY_CHECKER_H #define SAFETY_CHECKER_H #include <iostream> // Contains all of the control related data #include "ControlFSMData.h" /** * The SafetyChecker handles the checks requested by the ControlFSM. */ template <typename T> class SafetyChecker { public: SafetyChecker(ControlFSMData<T>* dataIn) : ...
791
25.4
80
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_RecoveryStand.h
#ifndef FSM_STATE_RECOVERY_STANDUP_H #define FSM_STATE_RECOVERY_STANDUP_H #include "FSM_State.h" /** * */ template <typename T> class FSM_State_RecoveryStand : public FSM_State<T> { public: FSM_State_RecoveryStand(ControlFSMData<T>* _controlFSMData); // Behavior to be carried out when entering a state void ...
1,956
21.755814
62
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_BalanceStand.h
#ifndef FSM_STATE_BALANCESTAND_H #define FSM_STATE_BALANCESTAND_H #include "FSM_State.h" template<typename T> class WBC_Ctrl; template<typename T> class LocomotionCtrlData; /** * */ template <typename T> class FSM_State_BalanceStand : public FSM_State<T> { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW FSM_State_Bal...
1,095
20.490196
61
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/ControlFSM.h
#ifndef CONTROLFSM_H #define CONTROLFSM_H #include <iostream> // Contains all of the control related data #include "ControlFSMData.h" // Checks the robot state and commands for safety #include "SafetyChecker.h" // FSM States #include "../FSM_States/FSM_State.h" #include "../FSM_States/FSM_State_BalanceStand.h" #inc...
3,380
26.487805
80
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_FrontJump.h
#ifndef FSM_STATE_FRONTJUMP_H #define FSM_STATE_FRONTJUMP_H #include "FSM_State.h" #include <Controllers/BackFlip/DataReader.hpp> #include <Controllers/BackFlip/FrontJumpCtrl.hpp> /** * */ template <typename T> class FSM_State_FrontJump : public FSM_State<T> { public: FSM_State_FrontJump(ControlFSMData<T>* _con...
1,567
21.084507
58
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_Vision.h
#ifndef FSM_STATE_VISION_H #define FSM_STATE_VISION_H #include <Controllers/convexMPC/ConvexMPCLocomotion.h> #include <Controllers/VisionMPC/VisionMPCLocomotion.h> #include "FSM_State.h" #include <thread> #include <lcm-cpp.hpp> #include "heightmap_t.hpp" #include "traversability_map_t.hpp" #include "velocity_visual_t....
2,399
25.966292
115
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_ImpedanceControl.h
#ifndef FSM_STATE_IMPEDANCECONTROL_H #define FSM_STATE_IMPEDANCECONTROL_H #include "FSM_State.h" /** * */ template <typename T> class FSM_State_ImpedanceControl : public FSM_State<T> { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW FSM_State_ImpedanceControl(ControlFSMData<T>* _controlFSMData); // Behavior to be c...
764
20.25
65
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_Locomotion.h
#ifndef FSM_STATE_LOCOMOTION_H #define FSM_STATE_LOCOMOTION_H #include <Controllers/convexMPC/ConvexMPCLocomotion.h> #include "FSM_State.h" template<typename T> class WBC_Ctrl; template<typename T> class LocomotionCtrlData; /** * */ template <typename T> class FSM_State_Locomotion : public FSM_State<T> { public: ...
1,193
22.88
60
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State.h
#ifndef FSM_State_H #define FSM_State_H #include <stdio.h> #include "ControlFSMData.h" #include "TransitionData.h" #include "Controllers/GaitScheduler.h" #include <Controllers/BalanceController/BalanceController.hpp> // Normal robot states #define K_PASSIVE 0 #define K_STAND_UP 1 #define K_BALANCE_STAND 3 #define K...
3,810
26.417266
76
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/TransitionData.h
/*============================= FSM State =============================*/ #ifndef TRANSITIONDATA_H #define TRANSITIONDATA_H /** * Struct of relevant data that can be used during transition to pass * data between states. */ template <typename T> struct TransitionData { EIGEN_MAKE_ALIGNED_OPERATOR_NEW TransitionD...
1,734
29.438596
73
h
Cheetah-Software
Cheetah-Software-master/user/MIT_Controller/FSM_States/FSM_State_BackFlip.h
#ifndef FSM_STATE_BACKFLIP_H #define FSM_STATE_BACKFLIP_H #include "FSM_State.h" #include <Controllers/BackFlip/DataReader.hpp> #include <Controllers/BackFlip/BackFlipCtrl.hpp> /** * */ template <typename T> class FSM_State_BackFlip : public FSM_State<T> { public: FSM_State_BackFlip(ControlFSMData<T>* _controlF...
1,558
20.957746
58
h
Cheetah-Software
Cheetah-Software-master/sim/include/sim_utilities.h
/*! @file sim_utilities.h * @brief Utility functions that exist only in the simulator */ #ifndef PROJECT_SIM_UTILITIES_H #define PROJECT_SIM_UTILITIES_H #include "Dynamics/spatial.h" #include "Math/orientation_tools.h" #include "cppTypes.h" #include <QMatrix4x4> using namespace spatial; /*! * Convert a spatial...
1,040
29.617647
80
h
Cheetah-Software
Cheetah-Software-master/sim/include/GameController.h
/*! @file GameController.h * @brief Code to read the Logitech F310 Game Controller * Creates a DriverCommand object to be sent to the robot controller * Used in the development simulator and in the robot control mode */ #ifndef PROJECT_GAMECONTROLLER_H #define PROJECT_GAMECONTROLLER_H #include "SimUtilities/Ga...
797
25.6
79
h
Cheetah-Software
Cheetah-Software-master/sim/include/Colors.h
/*! @file Colors.h * @brief Some colors commonly used in the simulator * * Colors stored for use with OpenGL. */ #ifndef PROJECT_COLORS_H #define PROJECT_COLORS_H static constexpr float windows2000[] = {220.f / 256.f, 234.f / 256.f, 242.f / 256.f}; static constexpr float d...
644
32.947368
69
h
Cheetah-Software
Cheetah-Software-master/sim/include/Graphics3D.h
/*! @file Graphics3D.h * @brief Visualizer window for simulator * * This class displays a window for 3D graphics. It also implements * scroll/pan/zoom. This uses OpenGL and QT. */ #ifndef PROJECT_GRAPHICS3D_H #define PROJECT_GRAPHICS3D_H #include "DrawList.h" #include "Math/FirstOrderIIRFilter.h" #include "obj...
5,792
26.325472
74
h
Cheetah-Software
Cheetah-Software-master/sim/include/SimControlPanel.h
/*! * @file SimControlPanel.h * @brief QT gui for the simulator */ #ifndef SIMCONTROLPANEL_H #define SIMCONTROLPANEL_H #include <QMainWindow> #include <thread> #include "ControlParameters/SimulatorParameters.h" #include "Graphics3D.h" #include "RobotInterface.h" #include "Simulation.h" #define DEFAULT_TERRAIN_FIL...
4,478
24.448864
113
h
Cheetah-Software
Cheetah-Software-master/sim/include/Checkerboard.h
/*! @file Checkerboard.cpp * @brief 3D Plane with Checkerboard Pattern * * Oriented with the center at the origin and a 0,0,1 normal */ #ifndef PROJECT_CHECKERBOARD_H #define PROJECT_CHECKERBOARD_H #include <vector> #include "Colors.h" #include "cTypes.h" class Checkerboard { public: Checkerboard(float xSiz...
1,117
22.787234
80
h
Cheetah-Software
Cheetah-Software-master/sim/include/Simulation.h
/*! * @file Simulation.h * @brief Main simulation class */ #ifndef PROJECT_SIMULATION_H #define PROJECT_SIMULATION_H #include "ControlParameters/ControlParameterInterface.h" #include "ControlParameters/RobotParameters.h" #include "ControlParameters/SimulatorParameters.h" #include "Dynamics/Cheetah3.h" #include "Dy...
5,020
30.186335
89
h
Cheetah-Software
Cheetah-Software-master/sim/include/DrawList.h
/*! @file DrawList.h * @brief Data structure to store robot model to be drawn. * * Stores all the data (except for joint positions) for the robot. * Knows how to load cheetah robots from file. * Will need to support adding a variable number of items (for loading terrain * which needs to be drawn) * * Also ...
9,834
28.446108
80
h
Cheetah-Software
Cheetah-Software-master/sim/include/RobotInterface.h
/*! * @file RobotInterface.h * @brief Interface between simulator and hardware using LCM. */ #ifndef PROJECT_ROBOTINTERFACE_H #define PROJECT_ROBOTINTERFACE_H #include <ControlParameters/RobotParameters.h> #include <Dynamics/Quadruped.h> #include <Utilities/PeriodicTask.h> #include <cheetah_visualization_lcmt.hpp>...
2,498
29.108434
115
h
pyrevolve
pyrevolve-master/include/revolve_c.h
#ifndef ADJ_REVOLVE_H #define ADJ_REVOLVE_H #ifdef __cplusplus #include <iostream> #include "revolve.h" #endif typedef struct { void *ptr; } CRevolve; typedef enum { CACTION_ADVANCE, CACTION_TAKESHOT, CACTION_RESTORE, CACTION_FIRSTRUN, CACTION_YOUTURN, CACTION_TERMINATE, CACTION_ERROR } CACTION; #ifdef __cpl...
1,210
24.229167
121
h
ibim-levelset
ibim-levelset-master/molecule.h
// // Created by lurker on 2/10/17. // #ifndef MOLECULE_H #define MOLECULE_H #include "ls_point.h" class Molecule { public: vector<ls_point> centers; vector<scalar_t > radii; vector<scalar_t > charges; vector<vector<index_t >> adjacent; ls_point center; scalar_t radius; index_t N; v...
3,799
28.230769
98
h
ibim-levelset
ibim-levelset-master/gmres.h
// // Created by lurker on 3/22/17. // #ifndef LEVELSET_GMRES_H #define LEVELSET_GMRES_H #include "blas_wraper.h" inline void Update(Vector &x, int k, Matrix &h, Vector &s, Vector v[]) ; void GeneratePlaneRotation(scalar_t &dx, scalar_t &dy, scalar_t &cs, scalar_t &sn) ; void ApplyPlaneRotation(scalar_t &dx, scala...
541
21.583333
93
h
ibim-levelset
ibim-levelset-master/bbfmm.h
// // Created by lurker on 3/22/17. // #ifndef LEVELSET_BBFMM_H #define LEVELSET_BBFMM_H #if !defined __extern_always_inline && defined __clang__ # if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # define __extern_always_inlin...
19,633
30.264331
119
h
ibim-levelset
ibim-levelset-master/linalg.h
// // Created by lurker on 3/22/17. // #ifndef LEVELSET_LINALG_H #define LEVELSET_LINALG_H #include "utils.h" namespace bbfmm { class Vector { public: /* * data members */ index_t _row; bool_t _ownership; scalar_t *_data; Vector(int row = 0) : _row(r...
8,855
26.503106
114
h
ibim-levelset
ibim-levelset-master/ls_point.h
// // Created by lurker on 2/10/17. // #ifndef POINT_H #define POINT_H #include "utils.h" class ls_basePoint { public: scalar_t data[DIM]; ls_basePoint() {memset(data, 0, DIM * sizeof(scalar_t));} ls_basePoint(scalar_t _x, scalar_t _y, scalar_t _z) { data[0] = _x; data[1] = _y; ...
3,574
24
117
h
qratpreplus
qratpreplus-master/qratpreplus.h
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
2,356
27.39759
80
h
qratpreplus
qratpreplus-master/qbcp.h
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
1,139
25.511628
74
h
qratpreplus
qratpreplus-master/util.c
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
3,377
24.208955
75
c
qratpreplus
qratpreplus-master/mem.c
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
3,325
21.780822
72
c
qratpreplus
qratpreplus-master/parse.h
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
1,770
33.72549
78
h
qratpreplus
qratpreplus-master/parse.c
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
17,604
29.670732
106
c
qratpreplus
qratpreplus-master/mem.h
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
1,342
25.333333
70
h
qratpreplus
qratpreplus-master/util.h
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
2,302
32.867647
75
h
qratpreplus
qratpreplus-master/qratpreplus_internals.h
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
20,232
35.324955
86
h
qratpreplus
qratpreplus-master/qbce_qrat_plus.h
/* This file is part of QRATPre+. Copyright 2019 Florian Lonsing, Stanford University, USA. Copyright 2018 Florian Lonsing, Vienna University of Technology, Austria. QRATPre+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
1,177
29.205128
70
h