This class contains the main logic of the robotic arm. It handles the calculation of robotic path and handles moving the robot arm using the driver.
More...
#include <RobotController.hpp>
This class contains the main logic of the robotic arm. It handles the calculation of robotic path and handles moving the robot arm using the driver.
Internal event class. These events are send to the worker thread and handled accordingly.
Enumerator |
---|
move_to_ready |
Move the arm to the ready position.
|
pick_up_cup |
Robot arm should pick up a cup.
|
stop |
Stop the robotarm.
|
resume |
Resume the movement of the robotarm.
|
cancel |
Cancel current movement and reverse.
|
terminate |
The controller has to terminate.
|
Constructor.
- Parameters
-
driver | The driver to inject. |
HLR::Kinematics::RobotController::RobotController |
( |
const RobotController & |
rc | ) |
|
|
delete |
Copy constructor, deleted.
- Parameters
-
Move constructor, deleted.
- Parameters
-
Add object to the internal environment.
- Parameters
-
Get the controller state.
- Returns
- The current state.
void HLR::Kinematics::RobotController::move_cancel |
( |
| ) |
|
Cancel the action of the robotarm this reverses any action the robotarm was doing.
- Exceptions
-
std::logic_error | If the robotarm is not currently performing a move and isn't stopped. |
void HLR::Kinematics::RobotController::move_continue |
( |
| ) |
|
Continue the action of the robotarm when it is stopped.
- Exceptions
-
std::logic_error | If the robot is not currently stopped. |
void HLR::Kinematics::RobotController::move_stop |
( |
| ) |
|
Stop the current action. This pauses the current robot arm.
- Exceptions
-
std::logic_error | If the robot is not currently moving. |
Copy assignment operator, deleted.
- Parameters
-
- Returns
Move assignment operator, deleted.
- Parameters
-
- Returns
void HLR::Kinematics::RobotController::pick_up_cup |
( |
std::uint32_t |
id | ) |
|
Pick up the cup specfied by id. The specifed error callback is fired if anything goes wrong during the move operation.
- Exceptions
-
std::invalid_argument | If the cup is not found. |
std::logic_error | If the robot is currently allready performing an action. |
- Parameters
-
id | The id of the cup to pick up. |
void HLR::Kinematics::RobotController::remove_object |
( |
const EnvironmentObject & |
obj | ) |
|
Remove the object with the specified if from the internal environment.
- Parameters
-
void HLR::Kinematics::RobotController::set_error_callback |
( |
const std::function< void(ArmError)> & |
cb | ) |
|
Set the callback that is called when the robotarm cannot accomplish the path. This can happen When there is no possible path to the target. Or the emergency stop was called due to safety concerns. Once this callback is fired the arm will be in the stopped state and can be reenabled by using move_continue.
- Parameters
-
cb | The callback that will be called on error. |
void HLR::Kinematics::RobotController::set_state_change_callback |
( |
const std::function< void(RobotControllerState)> & |
cb | ) |
|
Set a callback to be called each time the robot arm state changes.
- Parameters
-
cb | The callback function to call. |
The documentation for this class was generated from the following file: