35 throw std::out_of_range(
"Invalid pointer: absolute pose of primary scene object.");
42 unsigned int& pMarkerId,
43 const std::vector<Eigen::Vector3d>& pSamples)
47 throw std::invalid_argument(
"Empty ros::publisher cannot be used to publish marker messages.");
50 visualization_msgs::MarkerArray array;
61 pPublisher->publish(array);
65 unsigned int& pMarkerId,
66 const std::vector<Eigen::Vector3d>& pAbsoluteSample,
67 const std::vector<Eigen::Vector3d>& pAbsoluteParentSample)
71 throw std::invalid_argument(
"Empty ros::publisher cannot be used to publish marker messages.");
74 if(pAbsoluteSample.size() != pAbsoluteParentSample.size())
75 throw std::invalid_argument(
"Unequal number of samples and corresponding parent poses.");
78 visualization_msgs::MarkerArray array;
85 array.markers.push_back(
generateArrowMessage(pMarkerId, pAbsoluteParentSample[i], pAbsoluteSample[i]));
88 pPublisher->publish(array);
93 visualization_msgs::Marker msg;
103 msg.id = pMarkerId++;
106 msg.type = visualization_msgs::Marker::SPHERE_LIST;
109 msg.action = visualization_msgs::Marker::ADD;
116 geometry_msgs::Point to;
120 msg.points.push_back(to);
124 msg.scale.x = msg.scale.y = msg.scale.z = 0.005 *
getScaleFactor();
127 msg.color.r = msg.color.g = msg.color.b = 0.0;
136 visualization_msgs::Marker msg;
148 msg.type = visualization_msgs::Marker::ARROW;
155 msg.id = pMarkerId++;
158 msg.action = visualization_msgs::Marker::ADD;
161 geometry_msgs::Point start;
165 msg.points.push_back(start);
168 geometry_msgs::Point stop;
172 msg.points.push_back(stop);
std::string getNamespace()
visualization_msgs::Marker generateTrajectoryMarker(unsigned int &pMarkerId, const std::vector< Eigen::Vector3d > &pSamples)
static const unsigned int VISUALIZATION_OFFSET
visualization_msgs::Marker generateArrowMessage(unsigned int &pMarkerId, Eigen::Vector3d pFrom, Eigen::Vector3d pTo)
boost::shared_ptr< ISM::Pose > mParentPose
void publishTrajectory(boost::shared_ptr< ros::Publisher > pPublisher, unsigned int &pMarkerId, const std::vector< Eigen::Vector3d > &pSamples)
void setParentPose(boost::shared_ptr< ISM::Pose > pPose)