Cheetah Software  1.0
Quadruped.h File Reference

Data structure containing parameters for quadruped robot. More...

#include "Dynamics/ActuatorModel.h"
#include "Dynamics/FloatingBaseModel.h"
#include "Dynamics/SpatialInertia.h"
#include <eigen3/Eigen/StdVector>
#include <vector>
+ Include dependency graph for Quadruped.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Quadruped< T >
 

Namespaces

 cheetah
 
 

Functions

template<typename T , typename T2 >
Vec3< T > withLegSigns (const Eigen::MatrixBase< T2 > &v, int legID)
 

Variables

constexpr size_t cheetah::num_act_joint = 12
 
constexpr size_t cheetah::num_q = 19
 
constexpr size_t cheetah::dim_config = 18
 
constexpr size_t cheetah::num_leg = 4
 
constexpr size_t cheetah::num_leg_joint = 3
 
constexpr float cheetah::servo_rate = 0.001
 
constexpr size_t linkID::FR = 9
 
constexpr size_t linkID::FL = 11
 
constexpr size_t linkID::HR = 13
 
constexpr size_t linkID::HL = 15
 
constexpr size_t linkID::FR_abd = 2
 
constexpr size_t linkID::FL_abd = 0
 
constexpr size_t linkID::HR_abd = 3
 
constexpr size_t linkID::HL_abd = 1
 

Detailed Description

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 buildModel() method which can be used to create a floating-base dynamics model of the quadruped.

Definition in file Quadruped.h.

Function Documentation

template<typename T , typename T2 >
Vec3<T> withLegSigns ( const Eigen::MatrixBase< T2 > &  v,
int  legID 
)

Flip signs of elements of a vector V depending on which leg it belongs to

Definition at line 207 of file Quadruped.cpp.

207  {
208  static_assert(T2::ColsAtCompileTime == 1 && T2::RowsAtCompileTime == 3,
209  "Must have 3x1 matrix");
210  switch (legID) {
211  case 0:
212  return Vec3<T>(v[0], -v[1], v[2]);
213  case 1:
214  return Vec3<T>(v[0], v[1], v[2]);
215  case 2:
216  return Vec3<T>(-v[0], -v[1], v[2]);
217  case 3:
218  return Vec3<T>(-v[0], v[1], v[2]);
219  default:
220  throw std::runtime_error("Invalid leg id!");
221  }
222 }
typename Eigen::Matrix< T, 3, 1 > Vec3
Definition: cppTypes.h:26

+ Here is the caller graph for this function: