gusimplewhiteboard
guWhiteboard::HAL_HeadTarget Class Reference

Class for moving a robotic head in abs coords. More...

#include <HAL_HeadTarget.hpp>

Inheritance diagram for guWhiteboard::HAL_HeadTarget:
Collaboration diagram for guWhiteboard::HAL_HeadTarget:

Public Member Functions

 HAL_HeadTarget ()
 Constructor. More...
 
void Stop ()
 Set stopping vars. More...
 
void GoToWithTime (float yaw, float pitch, int time=1000000)
 move to position in degrees over a given time More...
 
void GoToWithTime_rad (float yaw, float pitch, int time=1000000)
 move to position in radians over a given time More...
 
 HAL_HeadTarget (const std::string &str)
 String constructor (NYI) More...
 
void from_string (const std::string &str)
 Parser for recreating this class (NYI) More...
 
std::string description () const
 Description method for pretty printing the values in this class. More...
 
- Public Member Functions inherited from wb_hal_headtarget
 PROPERTY (float, target_pitchAngle) PROPERTY(float
 target pitch angle in radians More...
 
target_yawAngle PROPERTY(int, target_movement_time) BIT_PROPERTY(head_stopped) BIT_PROPERTY(head_cmd_mask) unsigned pad wb_hal_headtarget (float target_pitchAngle=0, float target_yawAngle=0, int target_movement_time=1000000, bool head_stopped=true)
 How long until the head should be at the target angles, stored in micro seconds. More...
 

Detailed Description

Class for moving a robotic head in abs coords.

Move the robotics head to the abs coord provided in this class

Examples

Examples of what to do with the class

HAL_HeadTarget().GoToWithTime(0, 0, 1000000);   //Move to 0 yaw and 0 pitch over 1 second
HAL_HeadTarget().GoToWithTime(30, 10, 3000000);     //Move to 30 degrees yaw and 10 degrees pitch over 3 second
HAL_HeadTarget().GoToWithTime_rad(-0.5235, -0.1745, 3000000);   //Move to -30 degrees yaw and -10 degrees pitch by passing radians values over 3 second
HAL_HeadTarget().Stop();    //Stop moving the head, can be issued mid-movement

Class values typically need to be passed to the Whiteboard for them to take effect

HAL_HeadTarget_t.set(HAL_HeadTarget().Stop());

Definition at line 40 of file HAL_HeadTarget.hpp.

Constructor & Destructor Documentation

◆ HAL_HeadTarget() [1/2]

guWhiteboard::HAL_HeadTarget::HAL_HeadTarget ( )
inline

Constructor.

Definition at line 46 of file HAL_HeadTarget.hpp.

◆ HAL_HeadTarget() [2/2]

guWhiteboard::HAL_HeadTarget::HAL_HeadTarget ( const std::string &  str)
inline

String constructor (NYI)

Parameters
strthe string to parse and use to recreate the this object

Definition at line 99 of file HAL_HeadTarget.hpp.

References from_string().

Member Function Documentation

◆ description()

std::string guWhiteboard::HAL_HeadTarget::description ( ) const
inline

Description method for pretty printing the values in this class.

Returns
pretty printed string

Definition at line 114 of file HAL_HeadTarget.hpp.

◆ from_string()

void guWhiteboard::HAL_HeadTarget::from_string ( const std::string &  str)
inline

Parser for recreating this class (NYI)

Parameters
strthe string to parse and use to recreate the this object

Definition at line 105 of file HAL_HeadTarget.hpp.

Referenced by HAL_HeadTarget().

◆ GoToWithTime()

void guWhiteboard::HAL_HeadTarget::GoToWithTime ( float  yaw,
float  pitch,
int  time = 1000000 
)
inline

move to position in degrees over a given time

Parameters
yawhoriz in abs degrees, see specific robot for limits
pitchvert in abs degrees, see specific robot for limits
timetime in micro seconds for the motion to take

Definition at line 63 of file HAL_HeadTarget.hpp.

References GoToWithTime_rad().

◆ GoToWithTime_rad()

void guWhiteboard::HAL_HeadTarget::GoToWithTime_rad ( float  yaw,
float  pitch,
int  time = 1000000 
)
inline

move to position in radians over a given time

Parameters
yawhoriz in abs degrees, see specific robot for limits
pitchvert in abs degrees, see specific robot for limits
timetime in micro seconds for the motion to take

Definition at line 74 of file HAL_HeadTarget.hpp.

Referenced by GoToWithTime().

◆ Stop()

void guWhiteboard::HAL_HeadTarget::Stop ( )
inline

Set stopping vars.

Definition at line 51 of file HAL_HeadTarget.hpp.


The documentation for this class was generated from the following file: