10 return (T(0) < val) - (val < T(0));
34 if (forwardpath.poses.size() > 0)
36 goal_.target_pose = forwardpath.poses.front();
38 plannerSwitcher->setUndoPathBackwardsPlannerConfiguration();
54 auto y = pose.position.y;
55 auto x = pose.position.x;
56 auto alpha = tf::getYaw(
goal_.target_pose.pose.orientation);
57 auto y0 =
goal_.target_pose.pose.position.y;
58 auto x0 =
goal_.target_pose.pose.position.x;
60 auto evalimplicit = cos(alpha) * (y - y0) - sin (alpha) * (x - x0);
71 ROS_WARN_STREAM(
"[CbUndoPathBackwards2] goal_ line passed: "
76 ROS_WARN_STREAM(
"[CbUndoPathBackwards2] virtual goal line passed, stopping behavior and success: "
85 ROS_INFO_STREAM_THROTTLE(1.0,
"[CbUndoPathBackwards2] goal_ line not passed yet: " << evalimplicit <<
"/"
92 double phi = tf::getYaw(
goal_.target_pose.pose.orientation);
93 visualization_msgs::Marker marker;
96 marker.header.stamp = ros::Time::now();
97 marker.ns =
"my_namespace2";
99 marker.type = visualization_msgs::Marker::SPHERE;
100 marker.action = visualization_msgs::Marker::ADD;
104 marker.color.a = 1.0;
105 marker.color.r = 1.0;
106 marker.color.g = 0.0;
107 marker.color.b = 0.0;
109 marker.pose =
goal_.target_pose.pose;
121 visualization_msgs::MarkerArray ma;
122 ma.markers.push_back(marker);
130 odomTracker->popPath();
ClMoveBaseZ * moveBaseClient_
ros::Publisher visualizationMarkersPub_
virtual void onEntry() override
odom_tracker::OdomTracker * odomTracker_
float evalPlaneSide(const geometry_msgs::Pose &pose)
std::function< void()> postVirtualLinePassed_
cl_move_base_z::Pose * robotPose_
virtual void update() override
float initial_plane_side_
virtual void onExit() override
geometry_msgs::Pose toPoseMsg()
const std::string & getReferenceFrame() const
void setWorkingMode(WorkingMode workingMode)
TComponent * getComponent()
void sendGoal(Goal &goal)
virtual void cancelGoal() override