$search

devsteer Class Reference

#include <devsteer.h>

Inheritance diagram for devsteer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int check_status (void)
int Close ()
int Configure ()
int32_t degrees2ticks (float degrees)
 devsteer (int32_t center=0)
int get_angle (float &degrees)
int Open ()
void publish_diag (const ros::Publisher &diag_pub)
int set_initial_angle (float position)
int steering_absolute (float position)
int steering_relative (float position)
float ticks2degrees (int32_t ticks)
 ~devsteer ()

Private Member Functions

int configure_steering (void)
int encoder_goto (float degrees)
int get_encoder (int32_t &iticks)
int get_status_word (uint16_t &status)
int64_t GetTime ()
int send_cmd (const char *string)
int servo_cmd (const char *string)
void servo_write_only (const char *string)
int write_register (int reg, int32_t val)

Private Attributes

bool center_on_exit_
int32_t center_ticks_
art_msgs::SteeringDiagnostics diag_msg_
std::string port_
float req_angle_
bool simulate_moving_errors_
float starting_angle_
int32_t starting_ticks_
double steering_rate_
bool training_

Detailed Description

Definition at line 71 of file devsteer.h.


Constructor & Destructor Documentation

devsteer::devsteer ( int32_t  center = 0  ) 

Definition at line 34 of file devsteer.cc.

devsteer::~devsteer (  )  [inline]

Definition at line 76 of file devsteer.h.


Member Function Documentation

int devsteer::check_status ( void   ) 

check device status

Returns:
0 if device seems to be working correctly
Todo:
make a header to define the status bits

Definition at line 110 of file devsteer.cc.

int devsteer::Close ( void   )  [virtual]

Reimplemented from Servo.

Definition at line 65 of file devsteer.cc.

int devsteer::Configure (  ) 

Definition at line 72 of file devsteer.cc.

int devsteer::configure_steering ( void   )  [private]

Definition at line 396 of file devsteer.cc.

int32_t devsteer::degrees2ticks ( float  degrees  )  [inline]

Definition at line 91 of file devsteer.h.

int devsteer::encoder_goto ( float  degrees  )  [private]

Definition at line 470 of file devsteer.cc.

int devsteer::get_angle ( float &  degrees  ) 

get steering angle

When running without actual steering controller, simulate the wheel motion.

Precondition:
not using the real wheel position sensor
center_ticks_ set correctly
Parameters:
degrees current steering angle, if I/O successful
Returns:
0 if successful, errno value otherwise
Postcondition:
sets diag_msg_.encoder value (if successful)

Definition at line 144 of file devsteer.cc.

int devsteer::get_encoder ( int32_t &  iticks  )  [private]

get steering encoder value

Parameters:
iticks set to encoder position, if I/O successful
Returns:
0 if successful, errno value otherwise
Postcondition:
diag_msg_.encoder updated, if successful and using real device

Definition at line 197 of file devsteer.cc.

int devsteer::get_status_word ( uint16_t &  status  )  [private]

Definition at line 226 of file devsteer.cc.

int64_t devsteer::GetTime (  )  [private]

Definition at line 28 of file devsteer.cc.

int devsteer::Open (  ) 

Definition at line 39 of file devsteer.cc.

void devsteer::publish_diag ( const ros::Publisher diag_pub  ) 

publish current diagnostic information

Parameters:
diag_pub ROS publish object for SteeringDiagnostics message.
Precondition:
diag_msg_ already updated for this cycle

Definition at line 266 of file devsteer.cc.

int devsteer::send_cmd ( const char *  string  )  [private]

Definition at line 494 of file devsteer.cc.

int devsteer::servo_cmd ( const char *  string  )  [private]

Definition at line 602 of file devsteer.cc.

void devsteer::servo_write_only ( const char *  string  )  [private]

Write a command to the Quicksilver, no response expected.

Returns:
no indication of whether it worked.

Definition at line 621 of file devsteer.cc.

int devsteer::set_initial_angle ( float  position  ) 

set the initial steering wheel angle

Precondition:
the controller is *not* in Profile Move mode, but data registers are set to the basic movement parameters.
Postcondition:
(if successful): The controller is in Profile Move Continuous mode. The position is set to reflect the initial wheel angle, and the soft limits are set in registers 39 and 40.
Returns:
0 if successful; errno value otherwise.

Definition at line 284 of file devsteer.cc.

int devsteer::steering_absolute ( float  position  ) 

Definition at line 377 of file devsteer.cc.

int devsteer::steering_relative ( float  position  ) 

Definition at line 384 of file devsteer.cc.

float devsteer::ticks2degrees ( int32_t  ticks  )  [inline]

Definition at line 97 of file devsteer.h.

int devsteer::write_register ( int  reg,
int32_t  val 
) [private]

Definition at line 481 of file devsteer.cc.


Member Data Documentation

bool devsteer::center_on_exit_ [private]

Definition at line 107 of file devsteer.h.

int32_t devsteer::center_ticks_ [private]

Definition at line 116 of file devsteer.h.

Definition at line 118 of file devsteer.h.

std::string devsteer::port_ [private]

Definition at line 108 of file devsteer.h.

float devsteer::req_angle_ [private]

Definition at line 113 of file devsteer.h.

Definition at line 110 of file devsteer.h.

float devsteer::starting_angle_ [private]

Definition at line 114 of file devsteer.h.

int32_t devsteer::starting_ticks_ [private]

Definition at line 115 of file devsteer.h.

double devsteer::steering_rate_ [private]

Definition at line 111 of file devsteer.h.

bool devsteer::training_ [private]

Definition at line 109 of file devsteer.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


art_servo
Author(s): Austin Robot Technology, Jack O'Quin
autogenerated on Fri Mar 1 14:13:42 2013