SMACC2
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
sm_aws_warehouse_navigation::StAcquireSensors Struct Reference

#include <st_acquire_sensors.hpp>

Inheritance diagram for sm_aws_warehouse_navigation::StAcquireSensors:
Inheritance graph
Collaboration diagram for sm_aws_warehouse_navigation::StAcquireSensors:
Collaboration graph

Public Types

typedef mpl::list< Transition< EvCbSuccess< CbWaitTransform, OrNavigation >, StStartNavigation, SUCCESS > > reactions
 
- Public Types inherited from smacc2::SmaccState< StAcquireSensors, SmAwsWarehouseNavigation >
typedef SmAwsWarehouseNavigation TContext
 
typedef Context::inner_context_type context_type
 
typedef context_type::state_iterator state_iterator
 
typedef mpl::list<> LastDeepState
 
typedef base_type::outermost_context_base_type outermost_context_base_type
 
typedef base_type::inner_context_ptr_type inner_context_ptr_type
 
typedef base_type::context_ptr_type context_ptr_type
 
typedef base_type::inner_initial_list inner_initial_list
 

Public Member Functions

void runtimeConfigure ()
 
void onEntry ()
 
void sendInitialPoseEstimation ()
 
void onExit ()
 
- Public Member Functions inherited from smacc2::SmaccState< StAcquireSensors, SmAwsWarehouseNavigation >
 SmaccState ()=delete
 
 SmaccState (my_context ctx)
 
virtual ~SmaccState ()
 
const smacc2::introspection::SmaccStateInfogetStateInfo ()
 
std::string getName () override
 
std::string getFullName ()
 
std::string getShortName ()
 
virtual ISmaccStategetParentState ()
 
void exit ()
 
void runtimeConfigure ()
 
void onEntry ()
 
void onExit ()
 
bool getGlobalSMData (std::string name, T &ret)
 
void setGlobalSMData (std::string name, T value)
 
void requiresComponent (SmaccComponentType *&storage)
 
virtual ISmaccStateMachinegetStateMachine ()
 
void checkWhileLoopConditionAndThrowEvent (bool(MostDerived::*conditionFn)())
 
void throwSequenceFinishedEvent ()
 
- Public Member Functions inherited from smacc2::ISmaccState
virtual ISmaccStateMachinegetStateMachine ()=0
 
virtual std::string getName ()=0
 
ISmaccStategetParentState ()
 
rclcpp::Node::SharedPtr & getNode ()
 
rclcpp::Logger getLogger ()
 
virtual std::string getClassName ()
 
template<typename TOrthogonal , typename TBehavior , typename... Args>
std::shared_ptr< TBehavior > configure (Args &&... args)
 
template<typename SmaccComponentType >
void requiresComponent (SmaccComponentType *&storage)
 
template<typename SmaccClientType >
void requiresClient (SmaccClientType *&storage)
 
template<typename T >
bool getGlobalSMData (std::string name, T &ret)
 
template<typename T >
void setGlobalSMData (std::string name, T value)
 
template<typename TStateReactor , typename TTriggerEvent , typename TEventList , typename... TEvArgs>
std::shared_ptr< TStateReactor > createStateReactor (TEvArgs... args)
 
template<typename TStateReactor , typename... TEvArgs>
std::shared_ptr< TStateReactor > createStateReactor (TEvArgs... args)
 
template<typename TEventGenerator , typename... TEvArgs>
std::shared_ptr< TEventGenerator > createEventGenerator (TEvArgs... args)
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
template<typename TransitionType >
void notifyTransition ()
 
void notifyTransitionFromTransitionTypeInfo (std::shared_ptr< smacc2::introspection::TypeInfo > &transitionTypeInfo)
 
std::vector< std::shared_ptr< StateReactor > > & getStateReactors ()
 
std::vector< std::shared_ptr< SmaccEventGenerator > > & getEventGenerators ()
 
template<typename TOrthogonal >
TOrthogonal * getOrthogonal ()
 
template<typename TEventGenerator >
TEventGenerator * getEventGenerator ()
 
template<typename TStateReactor >
TStateReactor * getStateReactor ()
 

Static Public Member Functions

static void staticConfigure ()
 
- Static Public Member Functions inherited from smacc2::SmaccState< StAcquireSensors, SmAwsWarehouseNavigation >
static void configure_orthogonal_runtime (std::function< void(TBehavior &bh, StAcquireSensors &)> initializationFunction)
 
static void configure_orthogonal_runtime (std::function< void(TBehavior &bh)> initializationFunction)
 
static void configure_orthogonal (Args &&... args)
 
static std::shared_ptr< smacc2::introspection::StateReactorHandlerstatic_createStateReactor (TArgs... args)
 
static std::shared_ptr< smacc2::introspection::EventGeneratorHandlerstatic_createEventGenerator (TUArgs... args)
 
static std::shared_ptr< smacc2::introspection::StateReactorHandlerstatic_createStateReactor_aux (TUArgs... args)
 
static void initial_deep_construct (outermost_context_base_type &outermostContextBase)
 
static void deep_construct (const context_ptr_type &pContext, outermost_context_base_type &outermostContextBase)
 
static inner_context_ptr_type shallow_construct (const context_ptr_type &pContext, outermost_context_base_type &outermostContextBase)
 

Public Attributes

cl_nav2z::Amclamcl_
 
- Public Attributes inherited from smacc2::SmaccState< StAcquireSensors, SmAwsWarehouseNavigation >
bool finishStateThrown
 
mpl::list<> * smacc_inner_type
 

Additional Inherited Members

- Protected Attributes inherited from smacc2::ISmaccState
rclcpp::Node::SharedPtr node_
 
std::shared_ptr< rclcpp::Logger > logger_
 
std::vector< std::shared_ptr< StateReactor > > stateReactors_
 
std::vector< std::shared_ptr< smacc2::SmaccEventGenerator > > eventGenerators_
 
ISmaccStateparentState_
 
const smacc2::introspection::SmaccStateInfostateInfo_
 

Detailed Description

Definition at line 23 of file st_acquire_sensors.hpp.

Member Typedef Documentation

◆ reactions

Definition at line 33 of file st_acquire_sensors.hpp.

Member Function Documentation

◆ onEntry()

void sm_aws_warehouse_navigation::StAcquireSensors::onEntry ( )
inline

Definition at line 61 of file st_acquire_sensors.hpp.

62 {
63 //sendInitialPoseEstimation();
64 //auto res = exec("ros2");
65 //RCLCPP_INFO(getLogger(), "launch result: %s", res.c_str());
66 }

◆ onExit()

void sm_aws_warehouse_navigation::StAcquireSensors::onExit ( )
inline

Definition at line 97 of file st_acquire_sensors.hpp.

97{}

◆ runtimeConfigure()

void sm_aws_warehouse_navigation::StAcquireSensors::runtimeConfigure ( )
inline

Definition at line 50 of file st_acquire_sensors.hpp.

51 {
52 // illegal wait workaround
53 // rclcpp::sleep_for(6s);
54
55 // ClNav2Z * navClient;
56 // getOrthogonal<OrNavigation>()->requiresClient(navClient);
57
58 // amcl_ = navClient->getComponent<Amcl>();
59 }

◆ sendInitialPoseEstimation()

void sm_aws_warehouse_navigation::StAcquireSensors::sendInitialPoseEstimation ( )
inline

Definition at line 68 of file st_acquire_sensors.hpp.

69 {
70 geometry_msgs::msg::PoseWithCovarianceStamped initialposemsg;
71 //bool useSimTime = getNode()->get_parameter("use_sim_time").as_bool();
72 //getNode()->set_parameter("use_sim_time",true);
73
74 initialposemsg.header.stamp = getNode()->now();
75 initialposemsg.header.frame_id = "map";
76
77 initialposemsg.pose.pose.position.x = 3.415412425994873;
78 initialposemsg.pose.pose.position.y = 2.0;
79 initialposemsg.pose.pose.position.z = 0;
80
81 initialposemsg.pose.pose.orientation.x = 0;
82 initialposemsg.pose.pose.orientation.y = 0;
83 initialposemsg.pose.pose.orientation.z = 1;
84 initialposemsg.pose.pose.orientation.w = 0;
85
86 //z: 0.9999985465626609
87 // w: 0.00170495529732811
88
89 initialposemsg.pose.covariance = {
90 0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0,
91 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
92 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06853891909122467};
93
94 amcl_->setInitialPose(initialposemsg);
95 }
void setInitialPose(const geometry_msgs::msg::PoseWithCovarianceStamped &initialpose)
Definition: amcl.cpp:38
rclcpp::Node::SharedPtr & getNode()
Definition: smacc_state.hpp:34

References amcl_, smacc2::ISmaccState::getNode(), and cl_nav2z::Amcl::setInitialPose().

Here is the call graph for this function:

◆ staticConfigure()

static void sm_aws_warehouse_navigation::StAcquireSensors::staticConfigure ( )
inlinestatic

Definition at line 38 of file st_acquire_sensors.hpp.

39 {
40 configure_orthogonal<OrNavigation, CbWaitTransform>("odom", "map", rclcpp::Duration(30000s));
41
42 //configure_orthogonal<OrNavigation, CbWaitPose>();
43 // configure_orthogonal<OrNavigation, CbWaitActionServer>(std::chrono::milliseconds(10000));
44 // configure_orthogonal<OrNavigation, CbWaitNav2Nodes>(std::vector<Nav2Nodes>{
45 // Nav2Nodes::PlannerServer, Nav2Nodes::ControllerServer, Nav2Nodes::BtNavigator});
46 }

References service_node_3::s.

Member Data Documentation

◆ amcl_

cl_nav2z::Amcl* sm_aws_warehouse_navigation::StAcquireSensors::amcl_

Definition at line 35 of file st_acquire_sensors.hpp.

Referenced by sendInitialPoseEstimation().


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