00001 #include <ros/ros.h> 00002 #include <interactive_markers/interactive_marker_server.h> 00003 #include <jsk_interactive_marker/interactive_marker_helpers.h> 00004 00005 #include <interactive_markers/menu_handler.h> 00006 #include <jsk_interactive_marker/SetPose.h> 00007 #include <jsk_interactive_marker/MarkerSetPose.h> 00008 00009 class DoorFoot{ 00010 public: 00011 void procAnimation(); 00012 visualization_msgs::Marker makeRWallMarker(); 00013 visualization_msgs::Marker makeLWallMarker(); 00014 visualization_msgs::Marker makeDoorMarker(); 00015 visualization_msgs::Marker makeKnobMarker(); 00016 visualization_msgs::Marker makeKnobMarker(int position); 00017 00018 visualization_msgs::Marker makeRFootMarker(); 00019 visualization_msgs::Marker makeLFootMarker(); 00020 00021 visualization_msgs::Marker makeFootMarker(geometry_msgs::Pose pose, bool right); 00022 visualization_msgs::InteractiveMarker makeInteractiveMarker(); 00023 void moveBoxCb( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback); 00024 void pushDoorCb( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback); 00025 void pullDoorCb( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback); 00026 void showStandLocationCb( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback); 00027 void showNextStepCb( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback); 00028 void showPreviousStepCb( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback); 00029 void updateBoxInteractiveMarker(); 00030 interactive_markers::MenuHandler makeMenuHandler(); 00031 00032 DoorFoot (); 00033 private: 00034 bool footstep_show_initial_p_; 00035 int footstep_index_; 00036 ros::NodeHandle nh_; 00037 ros::NodeHandle pnh_; 00038 boost::shared_ptr<interactive_markers::InteractiveMarkerServer> server_; 00039 00040 std::string server_name; 00041 std::string marker_name; 00042 00043 interactive_markers::MenuHandler menu_handler; 00044 double size_; 00045 bool push; 00046 bool use_color_knob; 00047 std::vector<geometry_msgs::PoseStamped> foot_list; 00048 geometry_msgs::Pose door_pose; 00049 }; 00050 00051 geometry_msgs::Pose getPose( XmlRpc::XmlRpcValue val); 00052 double getXmlValue( XmlRpc::XmlRpcValue val );