Go to the documentation of this file.
10 #include <jsk_interactive_marker/SetPose.h>
11 #include <jsk_interactive_marker/MarkerSetPose.h>
14 #include <jsk_interactive_marker/MarkerMenu.h>
15 #include <jsk_interactive_marker/MarkerPose.h>
17 #include <std_msgs/Int8.h>
18 #include "urdf_parser/urdf_parser.h"
19 #if ROS_VERSION_MINIMUM(1,12,0) // kinetic
20 #include <urdf_world/types.h>
47 visualization_msgs::InteractiveMarker
make6DofControlMarker( std::string name, geometry_msgs::PoseStamped &stamped,
float scale,
bool fixed_position,
bool fixed_rotation);
49 void proc_feedback(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
50 void proc_feedback(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback,
int type );
51 void pub_marker_tf ( std_msgs::Header header, geometry_msgs::Pose pose);
52 void pub_marker_pose ( std_msgs::Header header, geometry_msgs::Pose pose, std::string name,
int type );
57 void pub_marker_menuCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback,
int menu );
59 void pub_marker_menuCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback,
int menu,
int type);
61 void IMSizeLargeCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
63 void IMSizeMiddleCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
65 void IMSizeSmallCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
67 void changeMoveModeCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
69 void changeMoveModeCb1(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
71 void changeMoveModeCb2(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
73 void changeForceModeCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
75 void changeForceModeCb1(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
77 void changeForceModeCb2(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
80 void targetPointMenuCB(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
84 void ConstraintCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
86 void modeCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
90 void setOriginCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback,
bool origin_hand);
92 void ikmodeCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
94 void useTorsoCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
96 void usingIKCb(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
98 void marker_menu_cb(
const jsk_interactive_marker::MarkerMenuConstPtr &msg);
100 void updateHeadGoal(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback);
101 void updateBase(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback);
102 void updateFinger(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback, std::string hand);
104 visualization_msgs::InteractiveMarker
makeBaseMarker(
const char *name,
const geometry_msgs::PoseStamped &stamped,
float scale,
bool fixed);
122 void changeMarkerMoveMode( std::string mk_name ,
int im_mode,
float mk_size, geometry_msgs::PoseStamped dist_pose);
127 void addHandMarker(visualization_msgs::InteractiveMarker &im,std::vector < UrdfProperty > urdf_vec);
128 void addSphereMarker(visualization_msgs::InteractiveMarker &im,
double scale, std_msgs::ColorRGBA color);
129 void makeCenterSphere(visualization_msgs::InteractiveMarker &mk,
double mk_size);
133 bool markers_set_cb ( jsk_interactive_marker::MarkerSetPose::Request &req,
134 jsk_interactive_marker::MarkerSetPose::Response &res );
136 bool markers_del_cb ( jsk_interactive_marker::MarkerSetPose::Request &req,
137 jsk_interactive_marker::MarkerSetPose::Response &res );
139 void move_marker_cb (
const geometry_msgs::PoseStampedConstPtr &msg);
141 bool set_cb ( jsk_interactive_marker::MarkerSetPose::Request &req,
142 jsk_interactive_marker::MarkerSetPose::Response &res );
144 bool reset_cb ( jsk_interactive_marker::SetPose::Request &req,
145 jsk_interactive_marker::SetPose::Response &res );
151 void makeIMVisible(visualization_msgs::InteractiveMarker &im);
157 std::shared_ptr<interactive_markers::InteractiveMarkerServer>
server_;
223 std::list<visualization_msgs::InteractiveMarker>
imlist;
241 ROS_DEBUG_NAMED(
"control_state",
"gripper: on[%d|%d][%d], edit[%d|%d][%d], torso[%d|%d]",
243 ROS_DEBUG_NAMED(
"control_state",
"posture[%d|%d] torso[%d] base[%d] head[%d] projector[%d]",
void pub_marker_menu(std::string marker, int menu, int type)
void changeForceModeCb2(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void changeMarkerOperationModelMode(std::string mk_name)
void modeCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
interactive_markers::MenuHandler::EntryHandle h_mode_last2
bool reset_cb(jsk_interactive_marker::SetPose::Request &req, jsk_interactive_marker::SetPose::Response &res)
GripperState dual_grippers_
void proc_feedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
std_msgs::ColorRGBA color
interactive_markers::MenuHandler menu_handler_force1
visualization_msgs::InteractiveMarker makeBaseMarker(const char *name, const geometry_msgs::PoseStamped &stamped, float scale, bool fixed)
interactive_markers::MenuHandler::EntryHandle sub_menu_handle
visualization_msgs::InteractiveMarker make6DofControlMarker(std::string name, geometry_msgs::PoseStamped &stamped, float scale, bool fixed_position, bool fixed_rotation)
void initBodyMarkers(void)
ros::ServiceServer serv_markers_del_
geometry_msgs::PoseStamped head_goal_pose_
interactive_markers::MenuHandler::EntryHandle head_auto_look_handle_
void changeMarkerMoveMode(std::string mk_name, int im_mode)
void makeCenterSphere(visualization_msgs::InteractiveMarker &mk, double mk_size)
interactive_markers::MenuHandler::EntryHandle sub_menu_handle2
std::vector< UrdfProperty > rhand_urdf_
void pub_marker_pose(std_msgs::Header header, geometry_msgs::Pose pose, std::string name, int type)
void toggleStartIKCb(const std_msgs::EmptyConstPtr &msg)
interactive_markers::MenuHandler::EntryHandle h_mode_last3
bool markers_del_cb(jsk_interactive_marker::MarkerSetPose::Request &req, jsk_interactive_marker::MarkerSetPose::Response &res)
void usingIKCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void useTorsoCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
std::vector< MeshProperty > lhand_mesh_
void ConstraintCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
interactive_markers::MenuHandler menu_head_target_
std::string head_link_frame_
interactive_markers::MenuHandler::EntryHandle head_target_handle_
void updateBase(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
interactive_markers::MenuHandler menu_handler_force
interactive_markers::MenuHandler::EntryHandle rotation_t_menu_
interactive_markers::MenuHandler::EntryHandle sub_menu_handle_ik
std::vector< MeshProperty > rhand_mesh_
void changeMoveArm(std::string m_name, int menu)
interactive_markers::MenuHandler::EntryHandle stop_ik_menu_
interactive_markers::MenuHandler::EntryHandle use_torso_nil_menu_
MoveOriginState move_origin_state_
void loadUrdfFromYaml(XmlRpc::XmlRpcValue val, std::string name, std::vector< UrdfProperty > &mesh)
void lookAutomaticallyMenuCB(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
ControlState control_state_
void changeMarkerForceMode(std::string mk_name, int im_mode)
geometry_msgs::PoseStamped marker_pose_
interactive_markers::MenuHandler::EntryHandle h_mode_last
void changeMoveModeCb1(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
#define ROS_DEBUG_NAMED(name,...)
void changeMoveModeCb2(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
interactive_markers::MenuHandler menu_handler_force2
urdf::ModelInterfaceSharedPtr model
InteractiveMarkerInterface()
interactive_markers::MenuHandler::EntryHandle use_torso_menu_
void pub_marker_menuCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback, int menu)
void loadMeshFromYaml(XmlRpc::XmlRpcValue val, std::string name, std::vector< MeshProperty > &mesh)
void addSphereMarker(visualization_msgs::InteractiveMarker &im, double scale, std_msgs::ColorRGBA color)
void initControlMarkers(void)
interactive_markers::MenuHandler menu_finger_l_
std::string move_base_frame
std::vector< UrdfProperty > lhand_urdf_
interactive_markers::MenuHandler menu_handler
ros::Publisher pub_update_
ros::ServiceClient dynamic_tf_publisher_client_
interactive_markers::MenuHandler menu_handler1
interactive_markers::MenuHandler menu_finger_r_
void makeIMVisible(visualization_msgs::InteractiveMarker &im)
ros::ServiceServer serv_markers_set_
interactive_markers::MenuHandler::EntryHandle use_fullbody_menu_
ros::Subscriber sub_toggle_ik_mode_
interactive_markers::MenuHandler::EntryHandle start_ik_menu_
ros::ServiceServer serv_reset_
tf::TransformBroadcaster tfb_
void changeMoveModeCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void toggleIKModeCb(const std_msgs::EmptyConstPtr &msg)
interactive_markers::MenuHandler menu_handler2
boost::shared_ptr< ModelInterface > ModelInterfaceSharedPtr
void loadMeshes(XmlRpc::XmlRpcValue val)
ros::Subscriber sub_marker_pose_
void changeForceModeCb1(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void move_marker_cb(const geometry_msgs::PoseStampedConstPtr &msg)
geometry_msgs::Point position
void updateHeadGoal(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
interactive_markers::MenuHandler menu_base_
interactive_markers::MenuHandler::EntryHandle use_torso_t_menu_
void updateFinger(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback, std::string hand)
interactive_markers::MenuHandler menu_head_
ros::ServiceServer serv_set_
interactive_markers::MenuHandler::EntryHandle rotation_nil_menu_
void pub_marker_tf(std_msgs::Header header, geometry_msgs::Pose pose)
bool set_cb(jsk_interactive_marker::MarkerSetPose::Request &req, jsk_interactive_marker::MarkerSetPose::Response &res)
void targetPointMenuCB(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
ros::Subscriber sub_marker_menu_
void ikmodeCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
std::list< visualization_msgs::InteractiveMarker > imlist
void IMSizeLargeCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void setOriginCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback, bool origin_hand)
void IMSizeSmallCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
bool markers_set_cb(jsk_interactive_marker::MarkerSetPose::Request &req, jsk_interactive_marker::MarkerSetPose::Response &res)
void addHandMarker(visualization_msgs::InteractiveMarker &im, std::vector< UrdfProperty > urdf_vec)
ros::Subscriber sub_toggle_start_ik_
std::shared_ptr< interactive_markers::InteractiveMarkerServer > server_
void IMSizeMiddleCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
std::string root_link_name
geometry_msgs::Quaternion orientation
void changeForceModeCb(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void marker_menu_cb(const jsk_interactive_marker::MarkerMenuConstPtr &msg)