gusimplewhiteboard
|
Serial interface for the main giraff board. More...
#include <Giraff_MainSerialInterface.hpp>
Public Member Functions | |
Giraff_MainSerialInterface () | |
default constructor More... | |
Giraff_MainSerialInterface (const std::string &str) | |
string constructor (see from_string() below) More... | |
void | from_string (const std::string &str) |
parse class properties from a string More... | |
std::string | description () const |
pretty print method for showing the current property values More... | |
![]() | |
CONTROLLED_PROPERTY (float, velocity) CONTROLLED_PROPERTY(enum Giraff_MovementType | |
Giraff maximum velocity , Unit: m/s, Range: 0.0 / 150.0, Setter: Yes, Getter: Yes. More... | |
movement_type | CONTROLLED_PROPERTY (float, acceleration) CONTROLLED_PROPERTY(float |
Giraff acceleration, Unit: m/s2, Range: 0.0 / 150.0, Setter: Yes, Getter: Yes. More... | |
movement_type position | CONTROLLED_PROPERTY (enum Giraff_CoordType, coord_type) CONTROLLED_PROPERTY(float |
Changes the distances of position to relative or absolute. More... | |
movement_type position head_angle | CONTROLLED_PROPERTY (float, max_gear_ratio) CONTROLLED_PROPERTY(float |
Maximum virtual gear ratio, Unit: gr, Range: -1000.0 / 1000.0, Setter: Yes, Getter: Yes. More... | |
movement_type position head_angle gear_ratio_increments | CONTROLLED_PROPERTY (float, gear_ratio_slowdown_dist) CONTROLLED_PROPERTY(float |
Clothoid decelaration point, Unit: m, Range: -1000.0 / 1000.0, Setter: Yes, Getter: Yes. More... | |
movement_type position head_angle gear_ratio_increments current_gear_ratio | CONTROLLED_PROPERTY (int16_t, red_button_presses) CONTROLLED_PROPERTY(int16_t |
Number of red button presses, Unit: presses, Range: 0 / 2147483647, Setter: No, Getter: Yes. More... | |
movement_type position head_angle gear_ratio_increments current_gear_ratio blue_button_presses | CONTROLLED_PROPERTY (int16_t, dial_increments) PROPERTY(int16_t |
Incremental value of dial, Unit: value, Range: -2147483648 / 2147483647, Setter: No, Getter: Yes. More... | |
movement_type position head_angle gear_ratio_increments current_gear_ratio blue_button_presses padding | CONTROLLED_PROPERTY (int32_t, left_motor_encoder_ticks) CONTROLLED_PROPERTY(int32_t |
Left drive motor encoder pulses, Unit: pulses, Range: -100000000 / 100000000, Setter: Yes, Getter: Yes. More... | |
movement_type position head_angle gear_ratio_increments current_gear_ratio blue_button_presses padding right_motor_encoder_ticks | CONTROLLED_PROPERTY (int32_t, head_motor_encoder_ticks) CONTROL_BIT(velocity) CONTROL_BIT(movement_type) CONTROL_BIT(acceleration) CONTROL_BIT(position) CONTROL_BIT(coord_type) CONTROL_BIT(head_angle) CONTROL_BIT(max_gear_ratio) CONTROL_BIT(gear_ratio_increments) CONTROL_BIT(gear_ratio_slowdown_dist) CONTROL_BIT(current_gear_ratio) CONTROL_BIT(red_button_presses) CONTROL_BIT(blue_button_presses) CONTROL_BIT(dial_increments) CONTROL_BIT(left_motor_encoder_ticks) CONTROL_BIT(right_motor_encoder_ticks) CONTROL_BIT(head_motor_encoder_ticks) PROPERTY(int16_t |
Head tilt motor encoder pulses, Unit: pulses, Range: -100000000 / 100000000, Setter: Yes, Getter: Yes. More... | |
movement_type position head_angle gear_ratio_increments current_gear_ratio blue_button_presses padding right_motor_encoder_ticks padding2 | wb_giraff_main_serial () |
stuct constructor More... | |
Serial interface for the main giraff board.
This includes the buttons, battery data and motor control.
Set the giraff motor acceleration
Giraff_MainSerialInterface i; float acc = 0.3f; i.set_a(acc); //Sets the acceleration variable Giraff_MainSerialInterface_t.set(i); //Sends the set command via the wb to the giraff
Gets the current number of button presses on one of the giraffs front buttons
Giraff_MainSerialInterface i = Giraff_MainSerialInterface_t.get(); //get from the whiteboard fprintf(stderr, "Number of button presses: %d", i.but0());
Definition at line 46 of file Giraff_MainSerialInterface.hpp.
|
inline |
default constructor
Definition at line 52 of file Giraff_MainSerialInterface.hpp.
|
inline |
string constructor (see from_string() below)
[in] | str | a serialised string containing properties to set in this class |
Definition at line 58 of file Giraff_MainSerialInterface.hpp.
References from_string().
|
inline |
pretty print method for showing the current property values
Definition at line 135 of file Giraff_MainSerialInterface.hpp.
|
inline |
parse class properties from a string
[in] | str | a serialised string containing properties to set in this class |
Definition at line 80 of file Giraff_MainSerialInterface.hpp.
References DELIMITER, PARSE_FLOAT, PARSE_INT16, PARSE_INT32, PARSE_INT8, PARSER, SEP, and SV.
Referenced by Giraff_MainSerialInterface().