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.
|
move_to_cup |
Robot arm should pick up a cup.
|
pick_up_cup_stage1 |
Move the gripper to surround the cup.
|
pick_up_cup_stage2 |
Move the arm vertical upwards to grab the cup.
|
move_cup |
move the cup toward the end position.
|
move_stop |
Current action should be stopped. This means robot arm will stop.
|
move_continue |
The previously stopped action should be resumed.
|
move_cancel |
The current action should be cancelled. This will move the arm.
|
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. |
The documentation for this class was generated from the following file: