Base class definition for a Viper driver.

A derived class must implement the Update function to set the various motor controls at the current time. Alternatively, a derived class may directly access the associate Viper rover and control it through different means (such as applying torques to the wheel driveshafts).

#include <Viper.h>

Inheritance diagram for chrono::viper::ViperDriver:
Collaboration diagram for chrono::viper::ViperDriver:

Public Types

enum  DriveMotorType { DriveMotorType::SPEED, DriveMotorType::TORQUE }
 Type of drive motor control. More...

Public Member Functions

virtual DriveMotorType GetDriveMotorType () const =0
 Indicate the control type for the drive motors.
void SetSteering (double angle)
 Set current steering input (angle: negative for left, positive for right).
void SetSteering (double angle, ViperWheelID id)
 Set current steering input (angle: negative for left turn, positive for right turn). More...
void SetLifting (double angle)
 Set current lift input angle. More...

Protected Member Functions

virtual void Update (double time)=0
 Set the current rover driver inputs. More...

Protected Attributes

 associated Viper rover
std::array< double, 4 > drive_speeds
 angular speeds for drive motors
std::array< double, 4 > steer_angles
 angles for steer motors
std::array< double, 4 > lift_angles
 angles for lift motors


class Viper

Member Enumeration Documentation

◆ DriveMotorType

Type of drive motor control.


angular speed



Member Function Documentation

◆ SetLifting()

void chrono::viper::ViperDriver::SetLifting ( double  angle)

Set current lift input angle.

Set current lift input angles.

◆ SetSteering()

void chrono::viper::ViperDriver::SetSteering ( double  angle,
ViperWheelID  id 

Set current steering input (angle: negative for left turn, positive for right turn).

This function sets the steering angle for the specified wheel.

◆ Update()

virtual void chrono::viper::ViperDriver::Update ( double  time)
protectedpure virtual

Set the current rover driver inputs.

This function is called by the associated Viper at each rover Update. A derived class must update the values for the angular speeds for the drive motors, as well as the angles for the steering motors and the lift motors at the specified time. A positive steering input corresponds to a left turn and a negative value to a right turn.

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