31 ROS_INFO_STREAM(
"[CbNavigateForward] Straight motion distance: " << dist);
35 auto currentPoseMsg = p->toPoseMsg();
40 ROS_WARN_STREAM(
"[CbNavigateForward] Forcing initial straight motion orientation: " << currentPoseMsg.orientation);
43 tf::Transform currentPose;
44 tf::poseMsgToTF(currentPoseMsg, currentPose);
46 tf::Transform forwardDeltaTransform;
47 forwardDeltaTransform.setIdentity();
48 forwardDeltaTransform.setOrigin(tf::Vector3(dist, 0, 0));
50 tf::Transform targetPose = currentPose * forwardDeltaTransform;
52 ClMoveBaseZ::Goal goal;
53 goal.target_pose.header.frame_id = referenceFrame;
54 goal.target_pose.header.stamp = ros::Time::now();
55 tf::poseTFToMsg(targetPose, goal.target_pose.pose);
57 ROS_INFO_STREAM(
"TARGET POSE FORWARD: " << goal.target_pose.pose);
59 geometry_msgs::PoseStamped currentStampedPoseMsg;
60 currentStampedPoseMsg.header.frame_id = referenceFrame;
61 currentStampedPoseMsg.header.stamp = ros::Time::now();
62 tf::poseTFToMsg(currentPose, currentStampedPoseMsg.pose);
ClMoveBaseZ * moveBaseClient_
virtual void onExit() override
boost::optional< float > forwardDistance
odom_tracker::OdomTracker * odomTracker_
boost::optional< geometry_msgs::Quaternion > forceInitialOrientation
virtual void onEntry() override
const std::string & getReferenceFrame() const
void setStartPoint(const geometry_msgs::PoseStamped &pose)
void pushPath(std::string newPathTagName="")
void setWorkingMode(WorkingMode workingMode)
ISmaccState * getCurrentState()
TComponent * getComponent()
bool param(std::string param_name, T ¶m_val, const T &default_val) const
void sendGoal(Goal &goal)