37 #ifndef JSK_FOOTSTEP_PLANNER_FOOTSTEP_MARKER_H_ 38 #define JSK_FOOTSTEP_PLANNER_FOOTSTEP_MARKER_H_ 42 #include <jsk_footstep_msgs/PlanFootstepsAction.h> 43 #include <jsk_footstep_msgs/ExecFootstepsAction.h> 44 #include <jsk_interactive_marker/GetTransformableMarkerPose.h> 45 #include <jsk_interactive_marker/SetPose.h> 47 #include <geometry_msgs/PointStamped.h> 48 #include <geometry_msgs/PoseStamped.h> 49 #include <std_srvs/Empty.h> 52 #include <Eigen/Geometry> 53 #include <visualization_msgs/MarkerArray.h> 55 #include "jsk_footstep_planner/FootstepMarkerConfig.h" 56 #include "jsk_footstep_planner/SetHeuristicPath.h" 57 #include <dynamic_reconfigure/server.h> 58 #include <jsk_rviz_plugins/OverlayText.h> 84 PosePair(
const FootstepTrans& first,
const std::string& first_name,
85 const FootstepTrans& second,
const std::string& second_name);
86 virtual FootstepTrans getByName(
const std::string& name);
87 virtual FootstepTrans midcoords();
106 typedef boost::function<void(const visualization_msgs::InteractiveMarkerFeedbackConstPtr&)>
115 virtual void resetInteractiveMarker();
119 virtual visualization_msgs::Marker makeFootstepMarker(FootstepTrans pose,
122 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
123 virtual void processMenuFeedbackCB(
124 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
125 virtual void processPoseUpdateCB(
126 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
127 virtual void resetMarkerCB(
128 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
129 virtual void enable2DCB(
130 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
131 virtual void enable3DCB(
132 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
133 virtual void enableCubeCB(
134 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
135 virtual void enableLineCB(
136 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
137 virtual void enableSingleCB(
138 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
139 virtual void enableContinuousCB(
140 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
141 virtual void enableStackCB(
142 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
143 virtual void executeFootstepCB(
144 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
145 virtual void stackFootstepCB(
146 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
148 const ExecResult::ConstPtr &result);
149 virtual FootstepTrans getDefaultLeftLegOffset();
150 virtual FootstepTrans getDefaultRightLegOffset();
152 virtual void cancelPlanning();
153 virtual void plan(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
154 virtual void planIfPossible(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
156 const PlanResult::ConstPtr &result);
157 virtual jsk_footstep_msgs::FootstepArray footstepArrayFromPosePair(
PosePair::Ptr pose_pair,
158 const std_msgs::Header& header,
162 visualization_msgs::InteractiveMarker& int_marker);
163 virtual void setupGoalMarker(FootstepTrans pose,
164 visualization_msgs::InteractiveMarker& int_marker);
165 virtual void updateMarkerArray(
const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
166 virtual visualization_msgs::Marker originMarker(
167 const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
168 virtual visualization_msgs::Marker distanceTextMarker(
169 const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
170 virtual visualization_msgs::Marker distanceLineMarker(
171 const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
172 virtual visualization_msgs::Marker targetArrow(
173 const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
174 virtual visualization_msgs::Marker originBoundingBoxMarker(
175 const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
176 virtual visualization_msgs::Marker goalBoundingBoxMarker(
177 const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
178 virtual visualization_msgs::Marker stackedPosesMarker(
179 const std_msgs::Header& header,
const geometry_msgs::Pose& pose);
180 virtual void setupMenuHandler();
182 virtual void configCallback(Config& config, uint32_t level);
183 virtual void poseStampedCommandCallback(
const geometry_msgs::PoseStamped::ConstPtr& msg);
185 virtual bool resetMarkerService(
186 std_srvs::Empty::Request& req,
187 std_srvs::Empty::Response& res);
188 virtual bool toggleFootstepMarkerModeService(
189 std_srvs::Empty::Request& req,
190 std_srvs::Empty::Response& res);
191 virtual bool executeFootstepService(
192 std_srvs::Empty::Request& req,
193 std_srvs::Empty::Response& res);
194 virtual bool waitForExecuteFootstepService(
195 std_srvs::Empty::Request& req,
196 std_srvs::Empty::Response& res);
197 virtual bool waitForFootstepPlanService(
198 std_srvs::Empty::Request& req,
199 std_srvs::Empty::Response& res);
200 virtual bool getFootstepMarkerPoseService(
201 jsk_interactive_marker::GetTransformableMarkerPose::Request& req,
202 jsk_interactive_marker::GetTransformableMarkerPose::Response& res);
203 virtual bool stackMarkerPoseService(
204 jsk_interactive_marker::SetPose::Request& req,
205 jsk_interactive_marker::SetPose::Response& res);
207 virtual void publishCurrentMarkerMode();
209 virtual void callFollowPathPlan(
210 const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
264 jsk_footstep_msgs::Footstep last_steps_[2];
void processFeedbackCB(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)