00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef GRIPPER_CLICK_PICKUP_CARTESIAN
00031 #define GRIPPER_CLICK_PICKUP_CARTESIAN
00032
00033 #include "pr2_gripper_click/gripper_click_rviz_ui.h"
00034 #include "rviz_interaction_tools/cartesian_control.h"
00035 #include "ogre_tools/point_cloud.h"
00036
00037 namespace Ogre {
00038 class ManualObject;
00039 }
00040
00041 namespace pr2_gripper_click {
00042
00043 class GripperClickPickupCartesian : public GripperClickPlugin<GripperClickPickupAction>
00044 {
00045
00046 public:
00047
00048 GripperClickPickupCartesian();
00049
00050
00051 virtual void init( rviz::VisualizationManager *vis_manager, Ogre::SceneManager* scene_manager, Ogre::SceneNode* camera_node );
00052
00053 virtual bool setGoal( const GripperClickPickupGoal::ConstPtr &goal );
00054
00055 virtual bool getResult( GripperClickPickupResult &result );
00056
00057 virtual void update(float wall_dt, float ros_dt);
00058
00059
00060 virtual bool hasValidResult();
00061
00062
00063 virtual void show( );
00064 virtual void hide( );
00065
00066 virtual void onRenderWindowMouseEvents( wxMouseEvent& event, Ogre::Ray &mouse_ray );
00067
00068 virtual void getGripperParams( bool &visible, Ogre::Vector3 &position, Ogre::Quaternion &orientation, float &angle );
00069
00070 protected:
00071
00072 stereo_msgs::DisparityImage disparity_image_;
00073 sensor_msgs::CameraInfo camera_info_;
00074
00075 rviz_interaction_tools::CartesianControl *cartesian_control_;
00076
00077 Ogre::SceneNode *camera_node_;
00078
00079 bool initialized_;
00080
00081 float gripper_angle_;
00082 };
00083
00084 }
00085
00086 #endif