world_landmark.cpp
Go to the documentation of this file.
00001 #include "fetch_pbd_interaction/world_landmark.h"
00002 #include "fetch_pbd_interaction/world.h"
00003 
00004 namespace fetch_pbd_interaction {
00005 
00006 WorldLandmark::WorldLandmark(geometry_msgs::Pose pose, int ind, geometry_msgs::Vector3 dimensions,
00007                  sensor_msgs::PointCloud2 pc){// World *world, void (World::*removeObject)(std::string name), void (World::*generateGrasps)(std::string name)){
00008   
00009   // _removeObjectCallback = removeObject;
00010   // _generateGraspsCallback = generateGrasps;
00011   point_cloud = pc;
00012 
00013   assigned_name = "";
00014 
00015   index = ind;
00016 
00017   object = fetch_pbd_interaction::Landmark();
00018   object.name = getName();
00019   object.pose = pose;
00020   object.dimensions = dimensions;
00021   object.point_cloud = point_cloud;
00022   // menu_handler = interactive_markers::MenuHandler();
00023   int_marker = visualization_msgs::InteractiveMarker();
00024   is_removed = false;
00025   // this->world = world;
00026   // menu_handler.insert("Remove from scene", &WorldLandmark::remove, this);
00027   // menu_handler.insert("Generate grasps for object", &WorldLandmark::getGrasps, this);
00028   // menu_handler.insert("Remove from scene", boost::bind(&WorldLandmark::remove, this, _1));
00029   // menu_handler.insert("Generate grasps for object", boost::bind(&WorldLandmark::getGrasps, this, _1));
00030 
00031 }
00032 
00033 WorldLandmark::~WorldLandmark() {}
00034 
00035 std::string WorldLandmark::getName(){
00036   if (assigned_name == "") {
00037     std::stringstream sstm;
00038     sstm << "thing " << index;
00039     return sstm.str();
00040   }
00041   else {
00042     return assigned_name;
00043   } 
00044 }
00045 void WorldLandmark::remove(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback){
00046   ROS_INFO("Will remove object"); //, getName().c_str());
00047   // ((world)->*_removeObjectCallback)(object.name);
00048 
00049 }
00050 void WorldLandmark::getGrasps(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback){
00051   ROS_INFO("Generating grasps for object"); //: %s", getName().c_str());
00052   // ((world)->*_generateGraspsCallback)(object.name);
00053 }
00054 
00055 
00056 }


fetch_pbd_interaction
Author(s): Sarah Elliott
autogenerated on Thu Jun 6 2019 18:27:21