TechTheTime-HighLevel 0.0.1
The high level robot's code using ros2-foxy for the robotics competition(Erobot-2022)
Script Class Reference

#include <script.hpp>

Public Types

using actuator_profile_T = std::function< void(double, int)>
 
using id_profile_T = std::function< void(int)>
 
using move_profile_T = std::function< void(double, double)>
 
using order_profile_T = std::variant< void_profile_T, move_profile_T, actuator_profile_T, id_profile_T >
 
using void_profile_T = std::function< void()>
 

Public Member Functions

void angleABS (double, int)
 
void down_servos ()
 
void drop_palet_gallery (int)
 
void drop_palet_ground (int)
 
void drop_replic ()
 
void drop_statue ()
 
void knock_over ()
 
void mesure ()
 
void move (double, double)
 
void moveREL (double, int)
 
void parse_script (const char *script_file)
 
void pushOrder (std::function< void()>)
 
void reverse_palet (int)
 
void run ()
 
 Script ()
 
void take_palet_ground (int)
 
void take_palet_horizontal (int)
 
void take_palet_vertical (int)
 
void take_statue ()
 
bool treat_response (MotionStatusCodes status, std::function< void()> OrderToReinsert, bool reinsert)
 
void up_servos ()
 
void wait_for_jumper ()
 

Private Attributes

std::shared_ptr< ActionClientcommClient
 
std::deque< std::function< void()> > deque_order
 
std::unordered_map< std::string, order_profile_Torders {}
 

Member Typedef Documentation

◆ actuator_profile_T

using actuator_profile_T = std::function<void(double, int)>

◆ id_profile_T

using id_profile_T = std::function<void(int)>

◆ move_profile_T

using move_profile_T = std::function<void(double, double)>

◆ order_profile_T

◆ void_profile_T

using void_profile_T = std::function<void()>

Constructor & Destructor Documentation

◆ Script()

Script ( )

Member Function Documentation

◆ angleABS()

void angleABS ( double  angle,
int  readjustment 
)

◆ down_servos()

void down_servos ( )

◆ drop_palet_gallery()

void drop_palet_gallery ( int  id)

◆ drop_palet_ground()

void drop_palet_ground ( int  id)

◆ drop_replic()

void drop_replic ( )

◆ drop_statue()

void drop_statue ( )

◆ knock_over()

void knock_over ( )

◆ mesure()

void mesure ( )

◆ move()

void move ( double  aim_x,
double  aim_y 
)

◆ moveREL()

void moveREL ( double  distance_rel,
int  recalage 
)

◆ parse_script()

void parse_script ( const char *  script_file)

◆ pushOrder()

void pushOrder ( std::function< void()>  orderToPush)

◆ reverse_palet()

void reverse_palet ( int  id)

◆ run()

void run ( )

◆ take_palet_ground()

void take_palet_ground ( int  id)

◆ take_palet_horizontal()

void take_palet_horizontal ( int  id)

◆ take_palet_vertical()

void take_palet_vertical ( int  id)

◆ take_statue()

void take_statue ( )

◆ treat_response()

bool treat_response ( MotionStatusCodes  status,
std::function< void()>  OrderToReinsert,
bool  reinsert = true 
)

◆ up_servos()

void up_servos ( )

◆ wait_for_jumper()

void wait_for_jumper ( )

Member Data Documentation

◆ commClient

std::shared_ptr<ActionClient> commClient
private

◆ deque_order

std::deque<std::function<void()> > deque_order
private

◆ orders

std::unordered_map<std::string, order_profile_T> orders {}
private

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