chrono::viper::ViperRover Class Reference


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

 ViperRover (ChSystem *system, const ChVector<> &rover_pos, const ChQuaternion<> &rover_rot, std::shared_ptr< ChMaterialSurface > wheel_mat, Wheel_Type wheel_type=Wheel_Type::RealWheel)
 ViperRover (ChSystem *system, const ChVector<> &rover_pos, const ChQuaternion<> &rover_rot, Wheel_Type wheel_type=Wheel_Type::RealWheel)
void Initialize ()
 Initialize the Viper rover using current parameters.
ChSystemGetSystem ()
 Get the containing system.
void SetDCControl (bool dc_control)
 Set DC motor control.
void SetMotorStallTorque (double torque, WheelID id)
 Set Motor Stall Torque This function only works if DC_Motor Control is enabled, if not, does nothing.
void SetMotorNoLoadSpeed (double rad_speed, WheelID id)
 Set DC motor no load Speed This function only works if DC_Motor Control is enabled, if not, does nothing.
void SetMotorSpeed (double rad_speed, WheelID id)
 Set motor speed.
void SetLiftMotorSpeed (double rad_speed, WheelID id)
 Set lift motor speed.
ChVector GetWheelSpeed (WheelID id)
 Get wheel speed.
ChVector GetWheelAngVel (WheelID id)
 Get wheel angular velocity.
ChVector GetWheelContactForce (WheelID id)
 Get wheel contact force.
ChVector GetWheelContactTorque (WheelID id)
 Get wheel contact torque.
ChVector GetWheelAppliedForce (WheelID id)
 Get wheel total applied force.
double GetWheelTracTorque (WheelID id)
 Get wheel tractive torque - if DC control set to off.
ChVector GetWheelAppliedTorque (WheelID id)
 Get wheel total applied torque.
std::shared_ptr< ChBodyAuxRefGetChassisBody ()
 Get the chassis body.
std::shared_ptr< ChBodyAuxRefGetWheelBody (WheelID id)
 Get the wheel body.
std::shared_ptr< ChBodyAuxRefGetSteeringBody (WheelID id)
 Get the steering body.
std::shared_ptr< ChBodyAuxRefGetUpArmBody (WheelID id)
 Get the upper arm body.
std::shared_ptr< ChBodyAuxRefGetBottomArmBody (WheelID id)
 Get the bottom arm body.
ChVector GetChassisVel ()
 Get chassis speedometer.
ChVector GetChassisAcc ()
 Get chassis accelerometer.
double GetRoverMass ()
 Get total rover mass.
double GetWheelMass ()
 Get total wheel mass.
std::shared_ptr< ChFunction_ConstGetMainMotorFunc (WheelID id)
 Get main motor function.
std::shared_ptr< ChFunction_ConstGetSteerMotorFunc (WheelID id)
 Get steer motor function.
std::shared_ptr< ChLinkMotorRotationSpeedGetMainMotorLink (WheelID id)
 Get main motor link.
std::shared_ptr< ChLinkMotorRotationSpeedGetSteerMotorLink (WheelID id)
 Get steer motor link.
void SetTurn (TurnSig id, double turn_speed=0.0)
 Set viper turning signal left/right/hold.
double GetTurnAngle () const
 Get viper turning angle - ranges from -CH_C_PI/3 to CH_C_PI/3.
TurnSig GetTurnState () const
 Get viper turning state - HOLD, LEFT, OR RIGHT.
void Update ()
 A viper status check and update function. More...
void UpdateDCMotorControl ()
 Sub-update function to update DC motor limit control.
void UpdateSteeringControl ()
 Sub-update function to update steering control.

Member Function Documentation

◆ Update()

void chrono::viper::ViperRover::Update ( )

A viper status check and update function.

Note: this function needs to be included in the main simulation loop.

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_models/robot/viper/Viper.h
  • /builds/uwsbel/chrono/src/chrono_models/robot/viper/Viper.cpp