Fabric 0.2.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
fabric::Fabric Class Reference

Class representing the main server of the fabric. More...

#include <server.hpp>

Inheritance diagram for fabric::Fabric:
Inheritance graph
[legend]
Collaboration diagram for fabric::Fabric:
Collaboration graph
[legend]

Public Types

using SetFabricPlan = fabric_msgs::srv::SetFabricPlan
 
using CancelFabricPlan = fabric_msgs::srv::CancelFabricPlan
 
using CompleteFabric = fabric_msgs::srv::CompleteFabric
 
using GetPlanStatus = fabric_msgs::srv::GetPlanStatus
 

Public Member Functions

 Fabric (const rclcpp::NodeOptions &options=rclcpp::NodeOptions())
 Construct a new Fabric object.
 
void initialize ()
 Initialize the Fabric node, action server and event client.
 

Protected Member Functions

void process ()
 The main process thread of the fabric.
 
void setPlanCallback (const std::shared_ptr< SetFabricPlan::Request > request, std::shared_ptr< SetFabricPlan::Response > response)
 Callback function to set a new fabric plan.
 
void cancelPlanCallback (const std::shared_ptr< CancelFabricPlan::Request > request, std::shared_ptr< CancelFabricPlan::Response > response)
 Callback function to cancel a fabric plan.
 
void setCompleteCallback (const std::shared_ptr< CompleteFabric::Request > request, std::shared_ptr< CompleteFabric::Response > response)
 Callback function to set the completion of a fabric plan.
 
void getPlanStatusCallback (const std::shared_ptr< GetPlanStatus::Request > request, std::shared_ptr< GetPlanStatus::Response > response)
 Callback function to get the status of a fabric plan.
 
fabric_msgs::msg::FabricStatus status_msg (PlanStatus status) const
 Convert internal plan status to fabric_msgs/PlanStatus message.
 
void reset ()
 Reset internal data structures for processing a new plan.
 

Static Protected Member Functions

static std::string generate_uuid ()
 Generate a UUID string for plan tracking.
 

Protected Attributes

std::deque< fabric::Planplan_queue_
 
fabric::Plan current_plan_
 
bool plan_completed_
 
std::mutex plan_mutex_
 
std::condition_variable plan_cv_
 
std::shared_ptr< CapabilityClientcapability_client_
 
std::vector< CapabilityInfocapability_list_
 
pluginlib::ClassLoader< fabric::ValidationBasevalidation_loader_
 
pluginlib::ClassLoader< fabric::ParserBaseparsing_loader_
 
std::shared_ptr< fabric::ParserBaseparsing_plugin_
 
std::shared_ptr< fabric::ValidationBasecompatibility_validation_plugin_
 
std::string bond_id_
 
std::map< std::string, std::shared_ptr< BondClient > > bond_client_cache_
 
std::string plan_file_path_
 
rclcpp::Service< SetFabricPlan >::SharedPtr plan_server_
 
rclcpp::Service< CancelFabricPlan >::SharedPtr cancel_server_
 
rclcpp::Service< CompleteFabric >::SharedPtr completion_server_
 
rclcpp::Service< GetPlanStatus >::SharedPtr get_plan_status_server_
 
std::thread process_thread
 

Detailed Description

Class representing the main server of the fabric.

Member Typedef Documentation

◆ CancelFabricPlan

using fabric::Fabric::CancelFabricPlan = fabric_msgs::srv::CancelFabricPlan

◆ CompleteFabric

using fabric::Fabric::CompleteFabric = fabric_msgs::srv::CompleteFabric

◆ GetPlanStatus

using fabric::Fabric::GetPlanStatus = fabric_msgs::srv::GetPlanStatus

◆ SetFabricPlan

using fabric::Fabric::SetFabricPlan = fabric_msgs::srv::SetFabricPlan

Constructor & Destructor Documentation

◆ Fabric()

fabric::Fabric::Fabric ( const rclcpp::NodeOptions &  options = rclcpp::NodeOptions())
inline

Construct a new Fabric object.

Parameters
optionsNode options for the Fabric node

Member Function Documentation

◆ cancelPlanCallback()

void fabric::Fabric::cancelPlanCallback ( const std::shared_ptr< CancelFabricPlan::Request >  request,
std::shared_ptr< CancelFabricPlan::Response >  response 
)
inlineprotected

Callback function to cancel a fabric plan.

◆ generate_uuid()

static std::string fabric::Fabric::generate_uuid ( )
inlinestaticprotected

Generate a UUID string for plan tracking.

◆ getPlanStatusCallback()

void fabric::Fabric::getPlanStatusCallback ( const std::shared_ptr< GetPlanStatus::Request >  request,
std::shared_ptr< GetPlanStatus::Response >  response 
)
inlineprotected

Callback function to get the status of a fabric plan.

◆ initialize()

void fabric::Fabric::initialize ( )
inline

Initialize the Fabric node, action server and event client.

◆ process()

void fabric::Fabric::process ( )
inlineprotected

The main process thread of the fabric.

◆ reset()

void fabric::Fabric::reset ( )
inlineprotected

Reset internal data structures for processing a new plan.

◆ setCompleteCallback()

void fabric::Fabric::setCompleteCallback ( const std::shared_ptr< CompleteFabric::Request >  request,
std::shared_ptr< CompleteFabric::Response >  response 
)
inlineprotected

Callback function to set the completion of a fabric plan.

◆ setPlanCallback()

void fabric::Fabric::setPlanCallback ( const std::shared_ptr< SetFabricPlan::Request >  request,
std::shared_ptr< SetFabricPlan::Response >  response 
)
inlineprotected

Callback function to set a new fabric plan.

◆ status_msg()

fabric_msgs::msg::FabricStatus fabric::Fabric::status_msg ( PlanStatus  status) const
inlineprotected

Convert internal plan status to fabric_msgs/PlanStatus message.

Member Data Documentation

◆ bond_client_cache_

std::map<std::string, std::shared_ptr<BondClient> > fabric::Fabric::bond_client_cache_
protected

Manages bond between capabilities server and this client

◆ bond_id_

std::string fabric::Fabric::bond_id_
protected

Bond id

◆ cancel_server_

rclcpp::Service<CancelFabricPlan>::SharedPtr fabric::Fabric::cancel_server_
protected

server to cancel the current plan in the capabilities2 fabric

◆ capability_client_

std::shared_ptr<CapabilityClient> fabric::Fabric::capability_client_
protected

Capability client to interact with capability server

◆ capability_list_

std::vector<CapabilityInfo> fabric::Fabric::capability_list_
protected

Capability List

◆ compatibility_validation_plugin_

std::shared_ptr<fabric::ValidationBase> fabric::Fabric::compatibility_validation_plugin_
protected

shared pointer for compatibility validation plugin

◆ completion_server_

rclcpp::Service<CompleteFabric>::SharedPtr fabric::Fabric::completion_server_
protected

server to get the status of the capabilities2 fabric

◆ current_plan_

fabric::Plan fabric::Fabric::current_plan_
protected

Current plan being processed

◆ get_plan_status_server_

rclcpp::Service<GetPlanStatus>::SharedPtr fabric::Fabric::get_plan_status_server_
protected

server to get the status of a fabric plan

◆ parsing_loader_

pluginlib::ClassLoader<fabric::ParserBase> fabric::Fabric::parsing_loader_
protected

◆ parsing_plugin_

std::shared_ptr<fabric::ParserBase> fabric::Fabric::parsing_plugin_
protected

shared pointer for parsing plugin

◆ plan_completed_

bool fabric::Fabric::plan_completed_
protected

Current plan related synchronization

◆ plan_cv_

std::condition_variable fabric::Fabric::plan_cv_
protected

◆ plan_file_path_

std::string fabric::Fabric::plan_file_path_
protected

File Path link

◆ plan_mutex_

std::mutex fabric::Fabric::plan_mutex_
protected

◆ plan_queue_

std::deque<fabric::Plan> fabric::Fabric::plan_queue_
protected

Vector of plans

◆ plan_server_

rclcpp::Service<SetFabricPlan>::SharedPtr fabric::Fabric::plan_server_
protected

server to set a new plan to the capabilities2 fabric

◆ process_thread

std::thread fabric::Fabric::process_thread
protected

Thread to manage sending goal

◆ validation_loader_

pluginlib::ClassLoader<fabric::ValidationBase> fabric::Fabric::validation_loader_
protected

Plugin loaders for each module package


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