18 double angle_increment_degree;
36 auto currentPoseMsg = p->toPoseMsg();
38 tf::Transform currentPose;
39 tf::poseMsgToTF(currentPoseMsg, currentPose);
42 ClMoveBaseZ::Goal goal;
43 goal.target_pose.header.frame_id = referenceFrame;
44 goal.target_pose.header.stamp = ros::Time::now();
46 auto currentAngle = tf::getYaw(currentPoseMsg.orientation);
47 auto targetAngle = currentAngle + angle_increment_degree * M_PI / 180.0;
48 goal.target_pose.pose.position = currentPoseMsg.position;
49 goal.target_pose.pose.orientation = tf::createQuaternionMsgFromYaw(targetAngle);
51 geometry_msgs::PoseStamped stampedCurrentPoseMsg;
52 stampedCurrentPoseMsg.header.frame_id = referenceFrame;
53 stampedCurrentPoseMsg.header.stamp = ros::Time::now();
54 stampedCurrentPoseMsg.pose = currentPoseMsg;
57 odomTracker->pushPath(
"RelativeRotation");
59 odomTracker->setStartPoint(stampedCurrentPoseMsg);
62 ROS_INFO_STREAM(
"current pose: " << currentPoseMsg);
63 ROS_INFO_STREAM(
"goal pose: " << goal.target_pose.pose);
ClMoveBaseZ * moveBaseClient_
virtual void onEntry() override
boost::optional< float > rotateDegree
void setDefaultPlanners()
const std::string & getReferenceFrame() const
This class track the required distance of the cord based on the external localization system.
void requiresClient(SmaccClientType *&storage)
ISmaccState * getCurrentState()
TComponent * getComponent()
bool param(std::string param_name, T ¶m_val, const T &default_val) const
void sendGoal(Goal &goal)