SMACC2
Loading...
Searching...
No Matches
cl_nav2z::CbSaveSlamMap Struct Reference

#include <cb_save_slam_map.hpp>

Inheritance diagram for cl_nav2z::CbSaveSlamMap:
Inheritance graph
Collaboration diagram for cl_nav2z::CbSaveSlamMap:
Collaboration graph

Public Member Functions

 CbSaveSlamMap ()
 
void onExit () override
 
std::shared_ptr< nav2_msgs::srv::SaveMap::Request > getRequest ()
 
- Public Member Functions inherited from smacc2::client_behaviors::CbServiceCall< ServiceType >
 CbServiceCall (const char *serviceName)
 
 CbServiceCall (const char *serviceName, std::shared_ptr< typename ServiceType::Request > request, std::chrono::milliseconds pollRate=100ms)
 
void onEntry () override
 
- Public Member Functions inherited from smacc2::SmaccAsyncClientBehavior
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
virtual ~SmaccAsyncClientBehavior ()
 
template<typename TCallback , typename T >
smacc2::SmaccSignalConnection onSuccess (TCallback callback, T *object)
 
template<typename TCallback , typename T >
smacc2::SmaccSignalConnection onFinished (TCallback callback, T *object)
 
template<typename TCallback , typename T >
smacc2::SmaccSignalConnection onFailure (TCallback callback, T *object)
 
void requestForceFinish ()
 
void executeOnEntry () override
 
void executeOnExit () override
 
void waitOnEntryThread (bool requestFinish)
 
template<typename TCallbackMethod , typename T >
smacc2::SmaccSignalConnection onSuccess (TCallbackMethod callback, T *object)
 
template<typename TCallbackMethod , typename T >
smacc2::SmaccSignalConnection onFinished (TCallbackMethod callback, T *object)
 
template<typename TCallbackMethod , typename T >
smacc2::SmaccSignalConnection onFailure (TCallbackMethod callback, T *object)
 
- Public Member Functions inherited from smacc2::ISmaccClientBehavior
 ISmaccClientBehavior ()
 
virtual ~ISmaccClientBehavior ()
 
ISmaccStateMachinegetStateMachine ()
 
std::string getName () const
 
template<typename SmaccClientType >
void requiresClient (SmaccClientType *&storage)
 
template<typename SmaccComponentType >
void requiresComponent (SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
 

Additional Inherited Members

- Public Attributes inherited from smacc2::client_behaviors::CbServiceCall< ServiceType >
std::shared_future< std::shared_ptr< typename ServiceType::Response > > resultFuture_
 
- Protected Member Functions inherited from smacc2::client_behaviors::CbServiceCall< ServiceType >
virtual void onServiceResponse (std::shared_ptr< typename ServiceType::Response >)
 
- Protected Member Functions inherited from smacc2::SmaccAsyncClientBehavior
void postSuccessEvent ()
 
void postFailureEvent ()
 
virtual void dispose () override
 
bool isShutdownRequested ()
 onEntry is executed in a new thread. However the current state cannot be left until the onEntry thread finishes. This flag can be checked from the onEntry thread to force finishing the thread.
 
- Protected Member Functions inherited from smacc2::ISmaccClientBehavior
virtual void runtimeConfigure ()
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
ISmaccStategetCurrentState ()
 
virtual rclcpp::Node::SharedPtr getNode () const
 
virtual rclcpp::Logger getLogger () const
 
- Protected Attributes inherited from smacc2::client_behaviors::CbServiceCall< ServiceType >
std::shared_ptr< rclcpp::Client< ServiceType > > client_
 
std::string serviceName_
 
std::shared_ptr< typename ServiceType::Request > request_
 
std::shared_ptr< typename ServiceType::Response > result_
 
std::chrono::milliseconds pollRate_
 

Detailed Description

Definition at line 35 of file cb_save_slam_map.hpp.

Constructor & Destructor Documentation

◆ CbSaveSlamMap()

cl_nav2z::CbSaveSlamMap::CbSaveSlamMap ( )

Definition at line 37 of file cb_save_slam_map.cpp.

37: CbServiceCall("/map_saver/save_map", getRequest()) {}
smacc2::client_behaviors::CbServiceCall< TService > CbServiceCall
std::shared_ptr< nav2_msgs::srv::SaveMap::Request > getRequest()

Member Function Documentation

◆ getRequest()

std::shared_ptr< nav2_msgs::srv::SaveMap::Request > cl_nav2z::CbSaveSlamMap::getRequest ( )

Definition at line 41 of file cb_save_slam_map.cpp.

42{
43 auto request = std::make_shared<nav2_msgs::srv::SaveMap::Request>();
44 request->map_topic = "map";
45 request->map_url = "/tmp/saved_map";
46 request->image_format = "png";
47 request->occupied_thresh = 0.65;
48 request->free_thresh = 0.25;
49 request->map_mode = "trinary";
50
51 return request;
52}

◆ onExit()

void cl_nav2z::CbSaveSlamMap::onExit ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 39 of file cb_save_slam_map.cpp.

39{}

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