Project Chrono: chrono::viper::ViperPart Class Reference

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
chrono::viper::ViperPart Class Reference
Models » Robot models » Viper moon rover model

## Description

Base class definition for all Viper parts.

Viper Rover Parts include Chassis, Steering, Upper Suspension Arm, Bottom Suspension Arm and Wheel.

`#include <Viper.h>`

Inheritance diagram for chrono::viper::ViperPart:
[legend]
Collaboration diagram for chrono::viper::ViperPart:
[legend]

## Public Member Functions
| ViperPart (const std::string &name, const ChFrame<> &rel_pos, std::shared_ptr< ChContactMaterial > mat, bool collide)
const std::string & | GetName () const
| Return the name of the part.
void | SetName (const std::string &name)
| Set the name of the part.
void | SetVisualize (bool state)
| Enable/disable visualization.
void | EnableCollision (bool state)
| Enable/disable collision.
void | Initialize (std::shared_ptr< ChBodyAuxRef > chassis)
| Initialize the rover part by attaching it to the specified chassis body.
std::shared_ptr< ChBodyAuxRef > | GetBody () const
| Return the ChBody of the corresponding Viper part.
const ChVector3d & | GetPos () const
| Return the position of the Viper part.
const ChQuaternion & | GetRot () const
| Return the rotation of the Viper part.
const ChVector3d & | GetLinVel () const
| Return the linear velocity of the Viper part.
const ChVector3d | GetAngVel () const
| Return the angular velocity of the Viper part.
const ChVector3d & | GetLinAcc () const
| Return the linear acceleration of the Viper part.
const ChVector3d | GetAngAcc () const
| Return the angular acceleratino of the Viper part.

## Protected Member Functions
void | CalcMassProperties (double density)
| Utility function for calculating mass properties using the part's collision mesh.
void | Construct (ChSystem *system)
| Construct the part body.

## Protected Attributes
std::string | m_name
| part name
std::shared_ptr< ChBodyAuxRef > | m_body
| part rigid body
std::shared_ptr< ChContactMaterial > | m_mat
| contact material
std::string | m_mesh_name
| visualization mesh name
ChFrame | m_mesh_xform
| mesh transform (translate, rotate, scale)
ChColor | m_color
| visualization asset color
ChFrame | m_pos
| relative position wrt the chassis
double | m_mass
| mass
ChVector3d | m_inertia
| principal moments of inertia
ChFrame | m_cog
| COG frame (relative to body frame).
bool | m_visualize
| part visualization flag
bool | m_collide
| part collision flag

## Constructor & Destructor Documentation

## ◆ ViperPart()

chrono::viper::ViperPart::ViperPart | ( | const std::string & | name,
|  | const ChFrame<> & | rel_pos,
|  | std::shared_ptr< ChContactMaterial > | mat,
|  | bool | collide )

Parameters

  name | part name
  rel_pos | position relative to chassis frame
  mat | contact material
  collide | enable collision?

## Member Function Documentation

## ◆ GetAngAcc()

const ChVector3d chrono::viper::ViperPart::GetAngAcc | ( |  | ) | const
| inline

Return the angular acceleratino of the Viper part.

This is the absolute angular acceleratin of the part reference frame.

## ◆ GetAngVel()

const ChVector3d chrono::viper::ViperPart::GetAngVel | ( |  | ) | const
| inline

Return the angular velocity of the Viper part.

This is the absolute angular velocity of the part reference frame.

## ◆ GetLinAcc()

const ChVector3d & chrono::viper::ViperPart::GetLinAcc | ( |  | ) | const
| inline

Return the linear acceleration of the Viper part.

This is the absolute linear acceleration of the part reference frame.

## ◆ GetLinVel()

const ChVector3d & chrono::viper::ViperPart::GetLinVel | ( |  | ) | const
| inline

Return the linear velocity of the Viper part.

This is the absolute linear velocity of the part reference frame.

## ◆ GetPos()

const ChVector3d & chrono::viper::ViperPart::GetPos | ( |  | ) | const
| inline

Return the position of the Viper part.

This is the absolute location of the part reference frame.

## ◆ GetRot()

const ChQuaternion & chrono::viper::ViperPart::GetRot | ( |  | ) | const
| inline

Return the rotation of the Viper part.

This is the orientation wrt the global frame of the part reference frame.

The documentation for this class was generated from the following files:

- D:/W/B/src/chrono-9.0.1/src/chrono_models/robot/viper/Viper.h
- D:/W/B/src/chrono-9.0.1/src/chrono_models/robot/viper/Viper.cpp