21 #include <boost/shared_ptr.hpp> 25 #include <eigen3/Eigen/Geometry> 33 #include <asr_msgs/AsrObject.h> 34 #include <asr_object_database/ObjectMetaData.h> 35 #include <std_srvs/Empty.h> 36 #include <geometry_msgs/PoseStamped.h> 41 #include "asr_world_model/GetFoundObjectList.h" 42 #include "asr_world_model/PushFoundObject.h" 43 #include "asr_world_model/PushFoundObjectList.h" 44 #include "asr_world_model/VisualizeSampledPoses.h" 68 {
return "push_found_object"; }
72 {
return "push_found_object_list"; }
76 {
return "empty_found_object_list"; }
80 {
return "get_found_object_list"; }
84 {
return "visualize_sampled_poses"; }
122 std_srvs::Empty::Response &response);
131 asr_world_model::GetFoundObjectList::Response &response);
139 asr_world_model::PushFoundObjectList::Response &response);
148 asr_world_model::PushFoundObject::Response &response)
155 asr_world_model::VisualizeSampledPoses::Response &response);
187 bool evaluateNeighborhood(
const asr_msgs::AsrObject &object1,
const asr_msgs::AsrObject &object2)
const;
194 const geometry_msgs::Pose &poseToInterpolate,
const double interpolationOffset,
const Eigen::Vector3d &axisToRotate,
const int numberOfInterpolationsPerOrientation)
const;
196 geometry_msgs::Pose
rotateOrientationAroundAxis(
const geometry_msgs::Pose &poseToRotate,
const double interpolationOffset,
const Eigen::Vector3d &axisToRotate)
const;
198 std::vector<geometry_msgs::Pose>
interpolatePoses(
const geometry_msgs::Pose &fromPose,
const geometry_msgs::Pose &toPose,
const int numberOfInterpolations)
const;
205 return ( first.second > second.second );
SettingsPtr settings_ptr_
bool processEmptyFoundObjectListServiceCall(std_srvs::Empty::Request &request, std_srvs::Empty::Response &response)
Empties the found object list.
geometry_msgs::Pose rotateOrientationAroundAxis(const geometry_msgs::Pose &poseToRotate, const double interpolationOffset, const Eigen::Vector3d &axisToRotate) const
FoundObjectHandler(boost::shared_ptr< ros::Publisher > marker_publisher_ptr, boost::shared_ptr< ros::ServiceClient > object_type_client_ptr, ModelTypePtrPerTypeMapPtr model_type_ptr_per_type_map_ptr, SettingsPtr settings_ptr)
Creates a new instance of FoundObjectHandler.
void updateBestHypothesis(ModelObjectPtr ¤tModelObjectPtr, const asr_msgs::AsrObject &candidate)
static const std::string GetPushFoundObjectListServiceName()
bool processGetFoundObjectListServiceCall(asr_world_model::GetFoundObjectList::Request &request, asr_world_model::GetFoundObjectList::Response &response)
Returns the already found objects.
bool transformToBaseFrame(asr_msgs::AsrObject &candidate) const
Transform object pose to base frame of world model.
tf::TransformListener tf_transform_listener_
std::vector< geometry_msgs::Pose > interpolateOrientationAroundAxis(const geometry_msgs::Pose &poseToInterpolate, const double interpolationOffset, const Eigen::Vector3d &axisToRotate, const int numberOfInterpolationsPerOrientation) const
WorldModel class provides services for adding the viewports of the next best views to a list and retr...
static const std::string GetEmptyFoundObjectListServiceName()
WorldModelVisualizerRVIZPtr world_model_visualizer_ptr_
PoseHelperPtr pose_helper_ptr_
boost::shared_ptr< ros::ServiceClient > object_type_client_ptr_
DebugHelperPtr debug_helper_ptr_
std::vector< geometry_msgs::Pose > interpolatePoses(const geometry_msgs::Pose &fromPose, const geometry_msgs::Pose &toPose, const int numberOfInterpolations) const
bool comparePbdObjectCluster(const PbdObjectCluster &first, const PbdObjectCluster &second)
bool processVisualizeSampledPosesCall(asr_world_model::VisualizeSampledPoses::Request &request, asr_world_model::VisualizeSampledPoses::Response &response)
bool pushFoundObject(asr_msgs::AsrObject &candidate)
bool sampleFoundObject(asr_msgs::AsrObject &candidate)
Generates samples for object pose estimation to model uncertainty.
bool evaluateNeighborhood(const asr_msgs::AsrObject &object1, const asr_msgs::AsrObject &object2) const
Determines if two objects are neighbors to each other in terms of position and orientation distance...
void visualizeFoundObjects()
ModelTypePtrPerTypeMapPtr model_type_ptr_per_type_map_ptr_
static const std::string GetPushFoundObjectServiceName()
bool processPushFoundObjectListServiceCall(asr_world_model::PushFoundObjectList::Request &request, asr_world_model::PushFoundObjectList::Response &response)
Pushes the found object to a list.
static const std::string GetVisualizeSampledPosesName()
std::pair< asr_msgs::AsrObject, int > PbdObjectCluster
bool processPushFoundObjectServiceCall(asr_world_model::PushFoundObject::Request &request, asr_world_model::PushFoundObject::Response &response)
Pushes the found object to a list.
static const std::string GetGetFoundObjectListServiceName()