Project Chrono: chrono::viper::Viper Class Reference

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

## Description

Viper rover class.

This class encapsulates the location and rotation information of all Viper parts wrt the chassis. This class should be the entry point to create a complete rover.

`#include <Viper.h>`

## Public Member Functions
| Viper (ChSystem *system, ViperWheelType wheel_type=ViperWheelType::RealWheel)
ChSystem * | GetSystem () const
| Get the containing system.
void | SetDriver (std::shared_ptr< ViperDriver > driver)
| Attach a driver system.
void | SetWheelContactMaterial (std::shared_ptr< ChContactMaterial > mat)
| Set wheel contact material.
void | SetChassisFixed (bool fixed)
| Fix the chassis to ground.
void | SetChassisVisualization (bool state)
| Enable/disable visualization of the rover chassis (default: true).
void | SetWheelVisualization (bool state)
| Enable/disable visualization of rover wheels (default: true).
void | SetSuspensionVisualization (bool state)
| Enable/disable visualization of rover suspensions (default: true).
void | Initialize (const ChFrame<> &pos)
| Initialize the Viper rover at the specified position.
std::shared_ptr< ViperChassis > | GetChassis () const
| Get the rover chassis.
std::array< std::shared_ptr< ViperWheel >, 4 > | GetWheels () const
| Get all rover wheels.
std::shared_ptr< ViperWheel > | GetWheel (ViperWheelID id) const
| Get the specified rover wheel.
std::shared_ptr< ViperUpright > | GetUpright (ViperWheelID id) const
| Get the specified rover upright.
std::shared_ptr< ViperUpperArm > | GetUpperArm (ViperWheelID id) const
| Get the specified rover upper arm.
std::shared_ptr< ViperLowerArm > | GetLowerArm (ViperWheelID id) const
| Get the specified rover lower arm.
std::shared_ptr< ChShaft > | GetDriveshaft (ViperWheelID id) const
| Get the specified rover driveshaft.
ChVector3d | GetChassisPos () const
| Get chassis position.
ChQuaternion | GetChassisRot () const
| Get chassis orientation.
ChVector3d | GetChassisVel () const
| Get chassis linear velocity.
ChVector3d | GetChassisAcc () const
| Get chassis linear acceleration.
ChVector3d | GetWheelLinVel (ViperWheelID id) const
| Get wheel speed.
ChVector3d | GetWheelAngVel (ViperWheelID id) const
| Get wheel angular velocity.
ChVector3d | GetWheelContactForce (ViperWheelID id) const
| Get wheel contact force.
ChVector3d | GetWheelContactTorque (ViperWheelID id) const
| Get wheel contact torque.
ChVector3d | GetWheelAppliedForce (ViperWheelID id) const
| Get wheel total applied force.
double | GetWheelTracTorque (ViperWheelID id) const
| Get wheel tractive torque - if DC control set to off.
ChVector3d | GetWheelAppliedTorque (ViperWheelID id) const
| Get wheel total applied torque.
double | GetRoverMass () const
| Get total rover mass.
double | GetWheelMass () const
| Get total wheel mass.
std::shared_ptr< ChFunctionSetpoint > | GetDriveMotorFunc (ViperWheelID id) const
| Get drive motor function.
std::shared_ptr< ChFunctionConst > | GetSteerMotorFunc (ViperWheelID id) const
| Get steer motor function.
std::shared_ptr< ChLinkMotorRotation > | GetDriveMotor (ViperWheelID id) const
| Get drive motor.
std::shared_ptr< ChLinkMotorRotation > | GetSteerMotor (ViperWheelID id) const
| Get steer motor.
void | Update ()
| Viper update function.

## Friends
class | ViperDCMotorControl

## Member Function Documentation

## ◆ GetDriveMotor()

std::shared_ptr< ChLinkMotorRotation > chrono::viper::Viper::GetDriveMotor | ( | ViperWheelID | id | ) | const
| inline

Get drive motor.

This will return an empty pointer if the associated driver uses torque control.

## ◆ GetDriveMotorFunc()

std::shared_ptr< ChFunctionSetpoint > chrono::viper::Viper::GetDriveMotorFunc | ( | ViperWheelID | id | ) | const
| inline

Get drive motor function.

This will return an empty pointer if the associated driver uses torque control.

## ◆ Update()

void chrono::viper::Viper::Update | ( |  | ) |

Viper update function.

This function must be called before each integration step.

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