Author: kaijenhsiao Date: 2012-05-18 19:58:42 -0700 (Fri, 18 May 2012) New Revision: 54707 Modified: stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/include/pr2_interactive_manipulation/interactive_manipulation_frontend.h stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/launch/pr2_interactive_manipulation_robot.launch stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation.ui stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation_frontend.cpp Log: added button for drawing reachable zones Modified: stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/include/pr2_interactive_manipulation/interactive_manipulation_frontend.h =================================================================== --- stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/include/pr2_interactive_manipulation/interactive_manipulation_frontend.h 2012-05-19 02:57:58 UTC (rev 54706) +++ stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/include/pr2_interactive_manipulation/interactive_manipulation_frontend.h 2012-05-19 02:58:42 UTC (rev 54707) @@ -85,6 +85,8 @@ void centerHeadButtonClicked(); + void drawReachableZonesButtonClicked(); + void resetButtonClicked(); void armGoButtonClicked(); @@ -129,7 +131,8 @@ //actionlib::SimpleActionClient *scripted_action_client_; //std::string scripted_action_name_; ros::Subscriber status_sub_; - + ros::Publisher draw_reachable_zones_pub_; + std::string rcommander_action_info_name_; std::string rcommander_group_name_; std::string action_name_; Modified: stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/launch/pr2_interactive_manipulation_robot.launch =================================================================== --- stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/launch/pr2_interactive_manipulation_robot.launch 2012-05-19 02:57:58 UTC (rev 54706) +++ stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/launch/pr2_interactive_manipulation_robot.launch 2012-05-19 02:58:42 UTC (rev 54707) @@ -320,4 +320,7 @@ + + + Modified: stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation.ui =================================================================== --- stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation.ui 2012-05-19 02:57:58 UTC (rev 54706) +++ stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation.ui 2012-05-19 02:58:42 UTC (rev 54707) @@ -17,7 +17,7 @@ - 2 + 0 @@ -72,6 +72,13 @@ + + + Draw Reachable Zones + + + + Qt::Horizontal Modified: stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation_frontend.cpp =================================================================== --- stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation_frontend.cpp 2012-05-19 02:57:58 UTC (rev 54706) +++ stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation/src/interactive_manipulation_frontend.cpp 2012-05-19 02:58:42 UTC (rev 54707) @@ -65,6 +65,7 @@ connect( ui_->stop_nav_button_, SIGNAL( clicked() ), this, SLOT( stopNavButtonClicked() )); connect( ui_->gripper_slider_, SIGNAL( valueChanged( int )), this, SLOT( gripperSliderScrollChanged() )); connect( ui_->center_head_button_, SIGNAL( clicked() ), this, SLOT( centerHeadButtonClicked() )); + connect( ui_->draw_reachable_zones_button_, SIGNAL( clicked() ), this, SLOT( drawReachableZonesButtonClicked() )); root_nh_.param("interactive_grasping/interface_number", interface_number_, 0); if (!interface_number_) ROS_WARN("No interface number specified for grasping study; using default configuration"); @@ -79,6 +80,8 @@ status_name_ = "interactive_manipulation_status"; status_sub_ = root_nh_.subscribe(status_name_, 1, &InteractiveManipulationFrontend::statusCallback, this); + draw_reachable_zones_pub_ = root_nh_.advertise("/draw_reachable_zones/ping", 10); + rcommander_action_info_name_ = "list_rcommander_actions"; rcommander_group_name_ = "house_hold"; rcommander_action_info_client_ = root_nh_.serviceClient(rcommander_action_info_name_); @@ -181,6 +184,11 @@ boost::bind(&InteractiveManipulationFrontend::feedbackCallback, this, _1)); } +void InteractiveManipulationFrontend::drawReachableZonesButtonClicked() +{ + draw_reachable_zones_pub_.publish(std_msgs::Empty()); +} + void InteractiveManipulationFrontend::graspButtonClicked() { pr2_object_manipulation_msgs::IMGUIGoal goal; _______________________________________________ Wg-ros-pkg-commits mailing list Wg-ros-pkg-commits@code.ros.org https://code.ros.org/mailman/listinfo/wg-ros-pkg-commits