SMACC2
|
#include <cp_pose.hpp>
Public Member Functions | |
Pose (std::string poseFrameName="base_link", std::string referenceFrame="odom") | |
Pose (StandardReferenceFrames referenceFrame) | |
void | onInitialize () override |
void | update () override |
void | waitTransformUpdate (rclcpp::Rate r=rclcpp::Rate(20)) |
geometry_msgs::msg::Pose | toPoseMsg () |
geometry_msgs::msg::PoseStamped | toPoseStampedMsg () |
float | getYaw () |
float | getX () |
float | getY () |
float | getZ () |
const std::string & | getReferenceFrame () const |
const std::string & | getFrameId () const |
Public Member Functions inherited from smacc2::ISmaccComponent | |
ISmaccComponent () | |
virtual | ~ISmaccComponent () |
virtual std::string | getName () const |
Public Member Functions inherited from smacc2::ISmaccUpdatable | |
ISmaccUpdatable () | |
ISmaccUpdatable (rclcpp::Duration duration) | |
void | executeUpdate (rclcpp::Node::SharedPtr node) |
void | setUpdatePeriod (rclcpp::Duration duration) |
Public Attributes | |
bool | isInitialized |
Private Attributes | |
geometry_msgs::msg::PoseStamped | pose_ |
std::string | poseFrameName_ |
std::string | referenceFrame_ |
std::mutex | m_mutex_ |
Static Private Attributes | |
static std::shared_ptr< tf2_ros::Buffer > | tfBuffer_ |
static std::shared_ptr< tf2_ros::TransformListener > | tfListener_ |
static std::mutex | listenerMutex_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccComponent | |
virtual void | onInitialize () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename TComponent > | |
void | requiresComponent (TComponent *&requiredComponentStorage) |
template<typename TClient > | |
void | requiresClient (TClient *&requiredClientStorage) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingComponent (TArgs... targs) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingNamedComponent (std::string name, TArgs... targs) |
rclcpp::Node::SharedPtr | getNode () |
rclcpp::Logger | getLogger () |
ISmaccStateMachine * | getStateMachine () |
virtual void | update ()=0 |
Protected Attributes inherited from smacc2::ISmaccComponent | |
ISmaccStateMachine * | stateMachine_ |
ISmaccClient * | owner_ |
Definition at line 44 of file cp_pose.hpp.
cl_nav2z::Pose::Pose | ( | std::string | poseFrameName = "base_link" , |
std::string | referenceFrame = "odom" |
||
) |
cl_nav2z::Pose::Pose | ( | StandardReferenceFrames | referenceFrame | ) |
Definition at line 55 of file cp_pose.cpp.
|
inline |
|
inline |
Definition at line 77 of file cp_pose.hpp.
References referenceFrame_.
Referenced by cl_nav2z::CbNavigateGlobalPosition::execute(), cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateBackwards::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), and cl_nav2z::CbRotate::onEntry().
float cl_nav2z::Pose::getX | ( | ) |
float cl_nav2z::Pose::getY | ( | ) |
float cl_nav2z::Pose::getYaw | ( | ) |
Definition at line 118 of file cp_pose.cpp.
References pose_.
Referenced by sm_dance_bot_warehouse::cl_nav2z::CpSquareShapeBoundary::getForwardDistance(), sm_dance_bot_warehouse_2::cl_nav2z::CpSquareShapeBoundary::getForwardDistance(), and sm_dance_bot_warehouse_3::cl_nav2z::CpSquareShapeBoundary::getForwardDistance().
float cl_nav2z::Pose::getZ | ( | ) |
|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 60 of file cp_pose.cpp.
References smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), listenerMutex_, poseFrameName_, referenceFrame_, tfBuffer_, and tfListener_.
|
inline |
Definition at line 58 of file cp_pose.hpp.
References m_mutex_, and pose_.
Referenced by cl_nav2z::WaypointNavigator::sendNextGoal().
|
inline |
|
overridevirtual |
Implements smacc2::ISmaccUpdatable.
Definition at line 124 of file cp_pose.cpp.
References smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), isInitialized, listenerMutex_, m_mutex_, pose_, poseFrameName_, referenceFrame_, and tfBuffer_.
void cl_nav2z::Pose::waitTransformUpdate | ( | rclcpp::Rate | r = rclcpp::Rate(20) | ) |
Definition at line 77 of file cp_pose.cpp.
References smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), isInitialized, listenerMutex_, m_mutex_, pose_, poseFrameName_, referenceFrame_, and tfBuffer_.
Referenced by cl_nav2z::CbWaitPose::onEntry().
bool cl_nav2z::Pose::isInitialized |
Definition at line 81 of file cp_pose.hpp.
Referenced by update(), and waitTransformUpdate().
|
staticprivate |
Definition at line 89 of file cp_pose.hpp.
Referenced by onInitialize(), update(), and waitTransformUpdate().
|
private |
Definition at line 94 of file cp_pose.hpp.
Referenced by toPoseMsg(), toPoseStampedMsg(), update(), and waitTransformUpdate().
|
private |
Definition at line 84 of file cp_pose.hpp.
Referenced by getX(), getY(), getYaw(), getZ(), Pose(), toPoseMsg(), toPoseStampedMsg(), update(), and waitTransformUpdate().
|
private |
Definition at line 91 of file cp_pose.hpp.
Referenced by getFrameId(), onInitialize(), update(), and waitTransformUpdate().
|
private |
Definition at line 92 of file cp_pose.hpp.
Referenced by getReferenceFrame(), onInitialize(), Pose(), update(), and waitTransformUpdate().
|
staticprivate |
Definition at line 86 of file cp_pose.hpp.
Referenced by onInitialize(), update(), and waitTransformUpdate().
|
staticprivate |
Definition at line 87 of file cp_pose.hpp.
Referenced by onInitialize().