14 ROS_ERROR(
"cb backward: distance must be greater or equal than 0");
15 this->backwardDistance = 0;
38 ROS_INFO_STREAM(
"[CbNavigateBackwards] Straight backwards motion distance: " << dist);
42 auto currentPoseMsg = p->toPoseMsg();
44 tf::Transform currentPose;
45 tf::poseMsgToTF(currentPoseMsg, currentPose);
46 tf::Transform forwardDeltaTransform;
47 forwardDeltaTransform.setIdentity();
48 forwardDeltaTransform.setOrigin(tf::Vector3(-dist, 0, 0));
49 tf::Transform targetPose = currentPose * forwardDeltaTransform;
50 ClMoveBaseZ::Goal goal;
51 goal.target_pose.header.frame_id = referenceFrame;
52 goal.target_pose.header.stamp = ros::Time::now();
53 tf::poseTFToMsg(targetPose, goal.target_pose.pose);
54 ROS_INFO_STREAM(
"[CbNavigateBackwards] TARGET POSE BACKWARDS: " << goal.target_pose);
67 ros::Duration(0.5).sleep();
ClMoveBaseZ * moveBaseClient_
virtual void onEntry() override
cl_move_base_z::odom_tracker::OdomTracker * odomTracker_
virtual void onExit() override
boost::optional< float > backwardDistance
void setBackwardPlanner()
const std::string & getReferenceFrame() const
void setStartPoint(const geometry_msgs::PoseStamped &pose)
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)