[Wg-ros-pkg-commits] r54707 - in stacks/pr2_object_manipulat…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: kaijenhsiao@code.ros.org
Date:  
To: wg-ros-pkg-commits
Subject: [Wg-ros-pkg-commits] r54707 - in stacks/pr2_object_manipulation/trunk/applications/pr2_interactive_manipulation: include/pr2_interactive_manipulation launch src
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<RunScriptAction> *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 @@
       <param name="table_thickness" value="0.01" />
   </node>


+ <!-- reachable zones marker broadcaster -->
+ <node pkg="pr2_marker_control" name="draw_reachable_zones" type="draw_reachable_zones.py" />
+
</launch>

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 @@
    <item>
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
-      <number>2</number>
+      <number>0</number>
      </property>
      <widget class="QWidget" name="grasp_place_panel_">
       <attribute name="title">
@@ -72,6 +72,13 @@
           </widget>
          </item>
          <item>
+          <widget class="QPushButton" name="draw_reachable_zones_button_">
+           <property name="text">
+            <string>Draw Reachable Zones</string>
+           </property>
+          </widget>
+         </item>
+         <item>
           <spacer name="horizontalSpacer_3">
            <property name="orientation">
             <enum>Qt::Horizontal</enum>


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<int>("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<std_msgs::Empty>("/draw_reachable_zones/ping", 10);
+
   rcommander_action_info_name_ = "list_rcommander_actions";
   rcommander_group_name_ = "house_hold";
   rcommander_action_info_client_ = root_nh_.serviceClient<pr2_object_manipulation_msgs::ActionInfo>(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

https://code.ros.org/mailman/listinfo/wg-ros-pkg-commits