chrono::curiosity::CuriosityDriver Class Referenceabstract

## Description

Base class definition for a Curiosity 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 Curiosity rover and control it through different means (such as applying torques to the wheel driveshafts).

#include <Curiosity.h>

Inheritance diagram for chrono::curiosity::CuriosityDriver:
Collaboration diagram for chrono::curiosity::CuriosityDriver:

## Public Types

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

## Public Member Functions

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

void SetSteering (double angle, CuriosityWheelID id)
Set current steering input (angle: negative for left turn, positive for right turn). More...

virtual DriveMotorType GetDriveMotorType () const =0
Indicate the control type for the drive motors.

## Protected Member Functions

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

## Protected Attributes

Curiositycuriosity
associated Curiosity rover

std::array< double, 6 > drive_speeds
angular speeds for drive motors (positive for forward motion)

std::array< double, 4 > steer_angles
angles for steer motors (negative for left turn, positive for right turn)

class Curiosity

## ◆ DriveMotorType

 strong

Type of drive motor control.

Enumerator
SPEED

angular speed

TORQUE

torque

## ◆ SetSteering() [1/2]

 void chrono::curiosity::CuriosityDriver::SetSteering ( double angle )

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

This function sets the same steering angle for all steerable wheels.

## ◆ SetSteering() [2/2]

 void chrono::curiosity::CuriosityDriver::SetSteering ( double angle, CuriosityWheelID 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::curiosity::CuriosityDriver::Update ( double time )
protectedpure virtual

Set the current rover driver inputs.

This function is called by the associated Curiosity 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/curiosity/Curiosity.h
• /builds/uwsbel/chrono/src/chrono_models/robot/curiosity/Curiosity.cpp