REPY-2.0 1.0
Mechanical module for modular robotics
Public Member Functions | Protected Member Functions | Protected Attributes
BasicServo Class Reference

Defines the simplest structure of a servo, and its data interface. More...

#include <basicservo.h>

Inheritance diagram for BasicServo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

double get_width ()
 Returns the width of the body of the servo.
double get_length ()
 Returns the length of the body of the servo.
double get_height ()
 Returns the height of the body of the servo.
double get_leg_h ()
 Returns the height at which the servo leg is placed.
double get_leg_x ()
 Returns the dimension of the leg on the X axis.
double get_leg_y ()
 Returns the dimension of the leg on the Y axis.
double get_leg_z ()
 Returns the dimension of the leg on the z axis.
int get_num_holes ()
 Returns the amount of holes of the servo legs.
double get_hole_r ()
 Returns the radius of the servo legs holes.
double get_hole_x ()
 Returns the offset of the servo leg holes on the X axis.
double get_hole_y ()
 Returns the offset of the servo leg holes on the Y axis.
double get_axis_h ()
 Returns the height at which the servo axis is placed.
double get_axis_r ()
 Returns the radius of the servo axis.
double get_axis_y ()
 Returns the position of the servo axis on the Y axis.
double get_horn_dist_axis ()
 Returns the distance between the servo body and the horn bigger part.
double get_width_tol ()
 Returns the clearance of the width of the servo body.
double get_length_tol ()
 Returns the clearance of the length of the servo body.
double get_height_tol ()
 Returns the clearance of the height of the servo body.
double get_horn_num_arms ()
 Returns the number of arms of the horn.
double get_horn_h_top ()
 Returns the thickness of the upper part of the horn.
double get_horn_r_top ()
 Returns the radius of the upper part of the horn.
double get_horn_h_axis ()
 Returns the thickness of the lower part of the horn.
double get_horn_r_axis ()
 Returns the radius of the lower part of the horn.
double get_horn_arm_r ()
 Returns the radius of the extreme of the horn arm.
double get_horn_arm_shift ()
 Returns the shift of the horn arm.
double get_horn_arm_dist ()
 Returns the distance between the center of the horn and the center of the arm circle.
double get_horn_tol ()
 Returns the clearance for making holes with the horn.
double get_horn_cut ()
 Returns the distance between the cut part and the rounded extreme.
bool horn_shown ()
 Returns the visibility of the horn.
Component get_horn ()
 Returns the horn as a component.
double get_horn_angle ()
 Returns the horn angle.
void set_horn (int arms, double angle=0, bool visibility=true, double cut=0)
 Sets the characteristics and dimensions of the horn.
void set_tolerances (double width_tol, double length_tol, double height_tol)
 Sets main servo body tolerances.

Protected Member Functions

 BasicServo ()
 Default constructor.
virtual void update_horn ()=0
 Sets the different default dimensions of the horn after a change in the horn main characteristics.
virtual Component build ()
 Builds and returns the BasicServo.
virtual void make_horn ()
 Builds the servo horn and saves it in horn variable.

Protected Attributes

double width
 wwidth of the body of the servo
double length
 length of the body of the servo
double height
 height of the body of the servo
double leg_h
 Height at which the servo leg is placed.
double leg_x
 Dimension of the leg on the X axis.
double leg_y
 Dimension of the leg on the Y axis.
double leg_z
 Dimension of the leg on the Z axis.
int num_holes
 Amount of holes of the servo legs.
double hole_r
 Radius of the servo leg holes.
double hole_x
 Offset of the servo leg holes on the X axis.
double hole_y
 Offset of the servo leg holes on the X axis.
double axis_h
 Height at which the servo axis is placed.
double axis_r
 Radius of the servo axis.
double axis_y
 Position of the servo axis on the Y axis.
double horn_dist_axis
 Distance between the servo body and the horn bigger part.
double width_tol
 Clearance of the width of the servo body.
double length_tol
 Clearance of the length of the servo body.
double height_tol
 Clearance of the height of the servo body.
std::vector< double > servo_color
 Color of the body of the servo.
Component horn
 Servo horn.
bool display_horn
 Stores the state of the horn: shown / not shown.
int horn_num_arms
 Number of arms of the horn.
double horn_h_top
 Thickness of the upper part of the horn.
double horn_r_top
 Radius of the upper part of the horn.
double horn_h_axis
 Thickness of the lower part of the horn.
double horn_r_axis
 Radius of the lower part of the horn.
double horn_arm_r
 Radius of the extreme of the horn arm.
double horn_arm_shift
 Shift of the horn arm.
double horn_arm_dist
 Distance between the center of the horn and the center of the arm circle.
double horn_tol
 Clearance for making holes with the horn.
double horn_cut
 Distance between the cut part and the rounded extreme.
std::vector< double > horn_color
 Color of the servo horn.
double horn_angle
 Angle of the horn.

Detailed Description

Defines the simplest structure of a servo, and its data interface.

To make objects compatible with as much servos as possible, new servos should inherit from this 'BasicServo'


The documentation for this class was generated from the following files:
 All Classes Functions Variables