1 #ifndef JSK_INTERACTIVE_MARKER_PARENT_AND_CHILD_INTERACTIVE_MARKER_SERVER_H_ 2 #define JSK_INTERACTIVE_MARKER_PARENT_AND_CHILD_INTERACTIVE_MARKER_SERVER_H_ 5 #include <std_srvs/Empty.h> 6 #include <jsk_interactive_marker/GetTransformableMarkerPose.h> 7 #include <jsk_interactive_marker/SetParentMarker.h> 8 #include <jsk_interactive_marker/RemoveParentMarker.h> 11 #include <boost/shared_ptr.hpp> 37 FeedbackCallback cb1,
cb2;
38 void call_func(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback) {
if(cb1) cb1(feedback);
if(cb2) cb2(feedback);}
42 bool setParentService(jsk_interactive_marker::SetParentMarker::Request &req, jsk_interactive_marker::SetParentMarker::Response &res);
43 void renewPoseWithParent(std::map <std::string, ParentMarkerInformation>::iterator assoc_it_, geometry_msgs::Pose parent_pose, std_msgs::Header parent_header);
44 bool removeParentService(jsk_interactive_marker::RemoveParentMarker::Request &req, jsk_interactive_marker::RemoveParentMarker::Response &res);
45 bool removeParent(std::string child_marker_name);
46 bool registerAssociationItself(std::string
parent_marker_name, std::string
parent_topic_name, std::string child_marker_name, geometry_msgs::PoseStamped child_pose_stamped);
47 bool registerAssociationWithOtherNode(std::string parent_marker_name, std::string parent_topic_name, std::string child_marker_name, geometry_msgs::PoseStamped child_pose_stamped);
48 bool registerAssociation(std::string parent_marker_name, std::string parent_topic_name, std::string child_marker_name, geometry_msgs::PoseStamped child_pose_stamped, geometry_msgs::PoseStamped parent_pose_stamped);
49 bool getMarkerPose(std::string target_name, geometry_msgs::PoseStamped &pose_stamped);
50 bool getMarkerPoseService(jsk_interactive_marker::GetTransformableMarkerPose::Request &req,jsk_interactive_marker::GetTransformableMarkerPose::Response &res);
51 geometry_msgs::Pose getRelativePose(geometry_msgs::PoseStamped parent_pose_stamped, geometry_msgs::PoseStamped child_pose_stamped);
52 void selfFeedbackCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback);
53 void parentUpdateCb(
const visualization_msgs::InteractiveMarkerUpdateConstPtr &
update, std::string parent_topic_name);
54 void parentFeedbackCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback, std::string parent_topic_name);
57 bool setCallback(
const std::string &name, FeedbackCallback feedback_cb, uint8_t feedback_type=DEFAULT_FEEDBACK_CB);
58 void insert(
const visualization_msgs::InteractiveMarker &int_marker);
59 void insert(
const visualization_msgs::InteractiveMarker &int_marker, FeedbackCallback feedback_cb, uint8_t feedback_type=DEFAULT_FEEDBACK_CB);
60 bool erase(
const std::string &name);
74 std::map <std::string, std::shared_ptr <FeedbackSynthesizer> >
callback_map_;
std::map< std::string, ParentMarkerInformation > association_list_
FeedbackSynthesizer(FeedbackCallback c1, FeedbackCallback c2)
void call_func(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
bool update(const T &new_val, T &my_val)
tf::TransformListener tf_listener_
std::string topic_server_name_
ros::ServiceServer remove_parent_srv_
std::map< std::string, std::shared_ptr< FeedbackSynthesizer > > callback_map_
std::map< std::string, ros::Subscriber > parent_feedback_subscribers_
std::map< std::string, int > parent_subscriber_nums_
ros::ServiceServer set_parent_srv_
ros::ServiceServer get_marker_pose_srv_
std::map< std::string, ros::Subscriber > parent_update_subscribers_